diff --git a/automation/presence.yaml b/automation/presence.yaml index 86a4699..5975f52 100644 --- a/automation/presence.yaml +++ b/automation/presence.yaml @@ -1,3 +1,21 @@ +- id: arrival_detecion + alias: Presence - Arrival Detection + trigger: + - platform: state + entity_id: binary_sensor.front_door_on_off + to: "on" + condition: + - condition: state + entity_id: input_boolean.georgi_home + state: "off" + + action: + - service: script.telegram_say + data: + message: "Georgi is home" + - service: input_boolean.turn_on + entity_id: input_boolean.georgi_home + - id: leaving_home alias: Presence - Leaving home trigger: @@ -5,11 +23,15 @@ entity_id: person.georgi to: "not_home" action: + - service: input_boolean.turn_off + entity_id: input_boolean.georgi_home - service: script.security_camera_on - service: media_player.turn_off entity_id: - media_player.living_room_tv - media_player.living_room_tv_2 + - service: media_player.media_stop + entity_id: media_player.master_bedroom - service: light.turn_off entity_id: light.living_room_all_lights - service: input_boolean.turn_off @@ -35,11 +57,19 @@ entity_id: person.georgi to: "home" action: - - service: media_player.turn_on - entity_id: media_player.living_room_tv_2 - - delay: "00:00:10" - - service: spotcast.start + - service: media_player.shuffle_set + entity_id: media_player.master_bedroom data: - device_name: "Living Room TV" - uri: "spotify:playlist:1dstTefWFQaBFTC6CjcEHd" - random_song: true + shuffle: true + - service: media_player.select_source + entity_id: media_player.master_bedroom + data: + source: Evening Chill + # - service: media_player.turn_on + # entity_id: media_player.living_room_tv_2 + # - delay: "00:00:10" + # - service: spotcast.start + # data: + # device_name: "Living Room TV" + # uri: "spotify:playlist:1dstTefWFQaBFTC6CjcEHd" + # random_song: true diff --git a/binary_sensor.yaml b/binary_sensor.yaml index 53c48fe..5e70391 100644 --- a/binary_sensor.yaml +++ b/binary_sensor.yaml @@ -3,11 +3,21 @@ - platform: template sensors: camera_state: - friendly_name: "Security camera" + friendly_name: Security camera device_class: safety value_template: >- {{ state_attr('camera.amcrest_camera', 'motion_recording') != 'on' }} + georgi_home: + friendly_name: Georgi + device_class: presence + value_template: "{{ is_state('input_boolean.georgi_home', 'on') }}" + entity_id: input_boolean.georgi_home + icon_template: > + {% if is_state('input_boolean.georgi_home','on') %} mdi:account + {% else %} mdi:account-off-outline + {% endif %} + # https://www.home-assistant.io/integrations/iss/ - platform: iss show_on_map: true diff --git a/configuration.yaml b/configuration.yaml index 235924e..3783ad7 100644 --- a/configuration.yaml +++ b/configuration.yaml @@ -156,6 +156,7 @@ wake_on_lan: weather: - platform: darksky api_key: !secret darksky_key + mode: daily # https://www.home-assistant.io/integrations/webostv webostv: diff --git a/customize/automation.yaml b/customize/automation.yaml index eeab05a..fe33c91 100644 --- a/customize/automation.yaml +++ b/customize/automation.yaml @@ -3,3 +3,6 @@ automation.coming_home: automation.leaving_home: icon: mdi:home + +automation.arrival_detecion: + icon: mdi:account-plus-outline diff --git a/customize/device_tracker.yaml b/customize/device_tracker.yaml index 144b49f..38dc77e 100644 --- a/customize/device_tracker.yaml +++ b/customize/device_tracker.yaml @@ -1,5 +1,10 @@ +device_tracker.carbon: + icon: mdi:cellphone-iphone + device_tracker.tile_p_6e3c33752f24f417254c039040a984bd: friendly_name: "Georgi's iPhone Tile" + icon: mdi:cellphone-iphone device_tracker.tile_1bcb2b3021b9f96b: friendly_name: "Keys Tile" + icon: mdi:key-variant diff --git a/input_boolean.yaml b/input_boolean.yaml index 7ddd0cf..f244fb7 100644 --- a/input_boolean.yaml +++ b/input_boolean.yaml @@ -1,5 +1,9 @@ # https://www.home-assistant.io/integrations/input_boolean +georgi_home: + name: Georgi Home + icon: mdi:account + sleep_mode: name: Sleep Mode initial: off diff --git a/scripts/speech.yaml b/scripts/speech.yaml index dcb6d12..e9f79a5 100644 --- a/scripts/speech.yaml +++ b/scripts/speech.yaml @@ -24,8 +24,7 @@ say_discretely: sequence: - service_template: > {% if is_state('media_player.master_bedroom', 'playing') - or is_state('input_boolean.guest_mode', 'on') - or is_state('input_boolean.speech_notifications', 'off') %} + or is_state('input_boolean.speech_notifications', 'off') %} script.telegram_say {% else %} script.sonos_blast