mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-06-21 02:47:44 +00:00
Setup binary_sensor for presence tracking. Minor tweaks
This commit is contained in:
@@ -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
|
||||
|
||||
+11
-1
@@ -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
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -3,3 +3,6 @@ automation.coming_home:
|
||||
|
||||
automation.leaving_home:
|
||||
icon: mdi:home
|
||||
|
||||
automation.arrival_detecion:
|
||||
icon: mdi:account-plus-outline
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
+1
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user