mirror of
https://github.com/GeorgeSG/sarah.git
synced 2026-09-06 09:58:45 +00:00
Refactor as packages
This commit is contained in:
@@ -1,49 +0,0 @@
|
|||||||
- alias: Domestina - Automate Start
|
|
||||||
trigger:
|
|
||||||
platform: time
|
|
||||||
at: "08:30:00"
|
|
||||||
condition:
|
|
||||||
- condition: time
|
|
||||||
weekday: thu
|
|
||||||
action:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
entity_id: input_boolean.domestina
|
|
||||||
|
|
||||||
- alias: Domestina - Start
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_boolean.domestina
|
|
||||||
from: "off"
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
- service: automation.turn_off
|
|
||||||
entity_id:
|
|
||||||
- automation.cube_knock
|
|
||||||
- automation.cube_shake
|
|
||||||
|
|
||||||
- alias: Domestina - Automate End
|
|
||||||
trigger:
|
|
||||||
platform: time
|
|
||||||
at: "13:00:00"
|
|
||||||
condition:
|
|
||||||
- condition: time
|
|
||||||
weekday: thu
|
|
||||||
action:
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
entity_id: input_boolean.domestina
|
|
||||||
|
|
||||||
- alias: Domestina - End
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_boolean.domestina
|
|
||||||
from: "on"
|
|
||||||
to: "off"
|
|
||||||
action:
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
- service: automation.turn_on
|
|
||||||
entity_id:
|
|
||||||
- automation.cube_knock
|
|
||||||
- automation.cube_shake
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
- id: enable_guest_mode
|
|
||||||
alias: Guest Mode - Enable
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
from: "off"
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
- service: automation.turn_off
|
|
||||||
entity_id:
|
|
||||||
- automation.leaving_home
|
|
||||||
- automation.coming_home
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
entity_id: input_boolean.speech_notifications
|
|
||||||
|
|
||||||
- id: disable_guest_mode
|
|
||||||
alias: Guest Mode - Disable
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_boolean.guest_mode
|
|
||||||
from: "on"
|
|
||||||
to: "off"
|
|
||||||
action:
|
|
||||||
- service: automation.turn_on
|
|
||||||
entity_id:
|
|
||||||
- automation.leaving_home
|
|
||||||
- automation.coming_home
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
entity_id: input_boolean.speech_notifications
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
- id: cube_knock
|
|
||||||
alias: Magic Cube - Knock - Go to bed
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: sensor.cube_multistate_input
|
|
||||||
to: "knock"
|
|
||||||
action:
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
|
|
||||||
- id: cube_shake
|
|
||||||
alias: Magic Cube - Shake - Wake up
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: sensor.cube_multistate_input
|
|
||||||
to: "shake"
|
|
||||||
action:
|
|
||||||
- service: input_boolean.turn_off
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
@@ -1,81 +0,0 @@
|
|||||||
# When my state changes to "home", wait for 15 minutes for the door to be opened, and then mark me as home
|
|
||||||
- id: arrival_detecion
|
|
||||||
alias: Presence - Arrival Detection
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: person.georgi
|
|
||||||
to: "home"
|
|
||||||
condition:
|
|
||||||
condition: state
|
|
||||||
entity_id: input_boolean.georgi_home
|
|
||||||
state: "off"
|
|
||||||
action:
|
|
||||||
- service: script.telegram_say
|
|
||||||
data:
|
|
||||||
message: "Device marked as home. Waiting for door to open!"
|
|
||||||
- wait_template: "{{ is_state('binary_sensor.front_door_on_off', 'on') }}"
|
|
||||||
continue_on_timeout: false
|
|
||||||
timeout: 00:15:00
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
entity_id: input_boolean.georgi_home
|
|
||||||
- service: script.telegram_say
|
|
||||||
data:
|
|
||||||
message: "Hey, I've marked you as home now!"
|
|
||||||
|
|
||||||
- id: leaving_home
|
|
||||||
alias: Presence - Leaving home
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
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
|
|
||||||
entity_id: input_boolean.speech_notifications
|
|
||||||
|
|
||||||
- id: coming_home
|
|
||||||
alias: Presence - Coming Home
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: person.georgi
|
|
||||||
to: "home"
|
|
||||||
action:
|
|
||||||
- service: script.security_camera_off
|
|
||||||
- service: light.turn_on
|
|
||||||
entity_id: light.living_room_all_lights
|
|
||||||
- service: input_boolean.turn_on
|
|
||||||
entity_id: input_boolean.speech_notifications
|
|
||||||
|
|
||||||
- id: coming_home_welcome
|
|
||||||
alias: Presence - Coming Home - Play welcome music
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: person.georgi
|
|
||||||
to: "home"
|
|
||||||
action:
|
|
||||||
- service: media_player.shuffle_set
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data:
|
|
||||||
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
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
- id: enable_sleep_mode
|
|
||||||
alias: Sleep Mode - Enable
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
from: "off"
|
|
||||||
to: "on"
|
|
||||||
action:
|
|
||||||
- service: media_player.media_stop
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
- service: fan.turn_on
|
|
||||||
entity_id: fan.philips_airpurifier
|
|
||||||
- service: media_player.turn_off
|
|
||||||
entity_id:
|
|
||||||
- media_player.living_room_tv
|
|
||||||
- media_player.living_room_tv_2
|
|
||||||
- service: light.turn_off
|
|
||||||
entity_id: light.living_room_all_lights
|
|
||||||
- delay: "00:00:02"
|
|
||||||
- service: media_player.volume_set
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data:
|
|
||||||
volume_level: 0.1
|
|
||||||
- service: script.say_discretely
|
|
||||||
data:
|
|
||||||
message: "Entering sleep mode. Good night!"
|
|
||||||
|
|
||||||
- id: disable_sleep_mode
|
|
||||||
alias: Sleep Mode - Disable
|
|
||||||
trigger:
|
|
||||||
platform: state
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
from: "on"
|
|
||||||
to: "off"
|
|
||||||
action:
|
|
||||||
- service: media_player.volume_set
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data:
|
|
||||||
volume_level: 0.3
|
|
||||||
- service: script.sarah_briefing
|
|
||||||
- delay: "00:00:25"
|
|
||||||
- service: script.talk
|
|
||||||
data:
|
|
||||||
message: "Here's some music to start the day!"
|
|
||||||
- delay: "00:00:02"
|
|
||||||
- service: media_player.select_source
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
data:
|
|
||||||
source: "Evening Chill"
|
|
||||||
- service: fan.turn_off
|
|
||||||
entity_id: fan.philips_airpurifier
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
# Hack - the switch.camera initial state is wrong (ON) when the server starts.
|
|
||||||
- id: hass_startup
|
|
||||||
alias: System - Startup
|
|
||||||
trigger:
|
|
||||||
- platform: homeassistant
|
|
||||||
event: start
|
|
||||||
action:
|
|
||||||
- service: switch.turn_off
|
|
||||||
entity_id: switch.camera
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
# https://www.home-assistant.io/integrations/binary_sensor
|
|
||||||
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
camera_state:
|
|
||||||
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 %}
|
|
||||||
|
|
||||||
living_room_right_window_on_off_wrapper:
|
|
||||||
friendly_name: Living Room Window
|
|
||||||
device_class: window
|
|
||||||
value_template: "{{ is_state('binary_sensor.living_room_right_window_on_off', 'on') }}"
|
|
||||||
entity_id: binary_sensor.living_room_right_window_on_off
|
|
||||||
icon_template: >
|
|
||||||
{% if is_state('binary_sensor.living_room_right_window_on_off', 'on') %} mdi:window-open-variant
|
|
||||||
{% else %} mdi:window-closed-variant
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
bedroom_right_window_on_off_wrapper:
|
|
||||||
friendly_name: Bedroom Window
|
|
||||||
device_class: window
|
|
||||||
value_template: "{{ is_state('binary_sensor.bedroom_right_window_on_off', 'on') }}"
|
|
||||||
entity_id: binary_sensor.bedroom_right_window_on_off
|
|
||||||
icon_template: >
|
|
||||||
{% if is_state('binary_sensor.bedroom_right_window_on_off', 'on') %} mdi:window-open-variant
|
|
||||||
{% else %} mdi:window-closed-variant
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
front_door_on_off_wrapper:
|
|
||||||
friendly_name: Front Door
|
|
||||||
device_class: door
|
|
||||||
value_template: "{{ is_state('binary_sensor.front_door_on_off', 'on') }}"
|
|
||||||
entity_id: binary_sensor.front_door_on_off
|
|
||||||
icon_template: >
|
|
||||||
{% if is_state('binary_sensor.front_door_on_off', 'on') %} mdi:door-open
|
|
||||||
{% else %} mdi:door-closed
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/iss/
|
|
||||||
- platform: iss
|
|
||||||
show_on_map: true
|
|
||||||
+18
-73
@@ -5,7 +5,7 @@ homeassistant:
|
|||||||
elevation: !secret home_elevation
|
elevation: !secret home_elevation
|
||||||
unit_system: metric
|
unit_system: metric
|
||||||
time_zone: Europe/Sofia
|
time_zone: Europe/Sofia
|
||||||
customize: !include_dir_merge_named customize
|
packages: !include_dir_named packages
|
||||||
|
|
||||||
#
|
#
|
||||||
# ─── HOME ASSISTANT COMPONENTS ENABLED ──────────────────────────────────────────
|
# ─── HOME ASSISTANT COMPONENTS ENABLED ──────────────────────────────────────────
|
||||||
@@ -30,14 +30,6 @@ map:
|
|||||||
# https://www.home-assistant.io/integrations/mobile_app
|
# https://www.home-assistant.io/integrations/mobile_app
|
||||||
mobile_app:
|
mobile_app:
|
||||||
|
|
||||||
# https://www.home-assistant.io/components/person
|
|
||||||
person:
|
|
||||||
- name: Georgi
|
|
||||||
id: !secret georgi_user_id
|
|
||||||
user_id: !secret georgi_user_id
|
|
||||||
device_trackers:
|
|
||||||
- device_tracker.carbon
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/components/system_health
|
# https://www.home-assistant.io/components/system_health
|
||||||
system_health:
|
system_health:
|
||||||
|
|
||||||
@@ -45,8 +37,8 @@ system_health:
|
|||||||
updater:
|
updater:
|
||||||
|
|
||||||
# https://www.home-assistant.io/components/logger
|
# https://www.home-assistant.io/components/logger
|
||||||
# logger:
|
logger:
|
||||||
# default: notset
|
default: warning
|
||||||
|
|
||||||
#
|
#
|
||||||
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
|
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
|
||||||
@@ -63,18 +55,6 @@ amcrest:
|
|||||||
- motion_detected
|
- motion_detected
|
||||||
- online
|
- online
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/automation
|
|
||||||
automation: !include_dir_merge_list automation
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/binary_sensor
|
|
||||||
binary_sensor: !include binary_sensor.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/device_tracker
|
|
||||||
device_tracker:
|
|
||||||
- platform: tile
|
|
||||||
username: !secret tile_username
|
|
||||||
password: !secret tile_password
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/ffmpeg
|
# https://www.home-assistant.io/integrations/ffmpeg
|
||||||
ffmpeg:
|
ffmpeg:
|
||||||
|
|
||||||
@@ -82,21 +62,20 @@ ffmpeg:
|
|||||||
frontend:
|
frontend:
|
||||||
themes: !include_dir_merge_named themes
|
themes: !include_dir_merge_named themes
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/group
|
|
||||||
group: !include groups.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/history
|
# https://www.home-assistant.io/integrations/history
|
||||||
history:
|
history:
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/input_boolean
|
|
||||||
input_boolean: !include input_boolean.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/light
|
|
||||||
light: !include light.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/media_extractor
|
# https://www.home-assistant.io/integrations/media_extractor
|
||||||
media_extractor:
|
media_extractor:
|
||||||
|
|
||||||
|
# https://www.home-assistant.io/integrations/tts
|
||||||
|
tts:
|
||||||
|
- platform: amazon_polly
|
||||||
|
aws_access_key_id: !secret aws_polly_client_id
|
||||||
|
aws_secret_access_key: !secret aws_polly_client_secret
|
||||||
|
region_name: eu-central-1
|
||||||
|
voice: Amy
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/notify
|
# https://www.home-assistant.io/integrations/notify
|
||||||
notify:
|
notify:
|
||||||
- name: telegram
|
- name: telegram
|
||||||
@@ -104,26 +83,6 @@ notify:
|
|||||||
api_key: !secret telegram_token
|
api_key: !secret telegram_token
|
||||||
chat_id: !secret telegram_georgi_chat_id
|
chat_id: !secret telegram_georgi_chat_id
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/scene
|
|
||||||
scene: !include scenes.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/script
|
|
||||||
script: !include_dir_merge_named scripts
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/sensor
|
|
||||||
sensor: !include sensor.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/spotify
|
|
||||||
spotify:
|
|
||||||
client_id: !secret spotify_client_id
|
|
||||||
client_secret: !secret spotify_client_secret
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/sun
|
|
||||||
sun:
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/switch
|
|
||||||
switch: !include switch.yaml
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/telegram
|
# https://www.home-assistant.io/integrations/telegram
|
||||||
# https://www.home-assistant.io/integrations/telegram_chatbot
|
# https://www.home-assistant.io/integrations/telegram_chatbot
|
||||||
telegram_bot:
|
telegram_bot:
|
||||||
@@ -132,13 +91,13 @@ telegram_bot:
|
|||||||
allowed_chat_ids:
|
allowed_chat_ids:
|
||||||
- !secret telegram_georgi_chat_id
|
- !secret telegram_georgi_chat_id
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/tts
|
# https://www.home-assistant.io/integrations/spotify
|
||||||
tts:
|
spotify:
|
||||||
- platform: amazon_polly
|
client_id: !secret spotify_client_id
|
||||||
aws_access_key_id: !secret aws_polly_client_id
|
client_secret: !secret spotify_client_secret
|
||||||
aws_secret_access_key: !secret aws_polly_client_secret
|
|
||||||
region_name: eu-central-1
|
# https://www.home-assistant.io/integrations/sun
|
||||||
voice: Amy
|
sun:
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/tuya
|
# https://www.home-assistant.io/integrations/tuya
|
||||||
tuya:
|
tuya:
|
||||||
@@ -152,12 +111,6 @@ upnp:
|
|||||||
# https://www.home-assistant.io/integrations/wake_on_lan
|
# https://www.home-assistant.io/integrations/wake_on_lan
|
||||||
wake_on_lan:
|
wake_on_lan:
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/weather.darksky
|
|
||||||
weather:
|
|
||||||
- platform: darksky
|
|
||||||
api_key: !secret darksky_key
|
|
||||||
mode: daily
|
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/webostv
|
# https://www.home-assistant.io/integrations/webostv
|
||||||
webostv:
|
webostv:
|
||||||
- host: !secret living_room_tv_ip
|
- host: !secret living_room_tv_ip
|
||||||
@@ -176,9 +129,6 @@ webostv:
|
|||||||
# https://www.home-assistant.io/integrations/zeroconf
|
# https://www.home-assistant.io/integrations/zeroconf
|
||||||
zeroconf:
|
zeroconf:
|
||||||
|
|
||||||
# https://www.home-assistant.io/integrations/zone
|
|
||||||
zone: !include zone.yaml
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# ─── PLUGINS ────────────────────────────────────────────────────────────────────
|
# ─── PLUGINS ────────────────────────────────────────────────────────────────────
|
||||||
#
|
#
|
||||||
@@ -191,9 +141,4 @@ hacs:
|
|||||||
token: !secret hacs_github_token
|
token: !secret hacs_github_token
|
||||||
appdaemon: true
|
appdaemon: true
|
||||||
|
|
||||||
# Philips Purifier
|
|
||||||
fan:
|
|
||||||
platform: philips-airpurifier
|
|
||||||
host: !secret philips_purifier_ip
|
|
||||||
|
|
||||||
uilogs:
|
uilogs:
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
automation.coming_home:
|
|
||||||
icon: mdi:home-account
|
|
||||||
|
|
||||||
automation.leaving_home:
|
|
||||||
icon: mdi:home
|
|
||||||
|
|
||||||
automation.arrival_detecion:
|
|
||||||
icon: mdi:account-plus-outline
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
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,8 +0,0 @@
|
|||||||
sensor.cube_multistate_input:
|
|
||||||
friendly_name: "Cube Input"
|
|
||||||
|
|
||||||
sensor.cube_analog_input:
|
|
||||||
friendly_name: "Cube Rotation"
|
|
||||||
|
|
||||||
sensor.cube_power:
|
|
||||||
friendly_name: "Cube Battery"
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
sensor.bedroom_weather_power:
|
|
||||||
friendly_name: "Bedroom Weather Battery"
|
|
||||||
|
|
||||||
sensor.bedroom_weather_temperature:
|
|
||||||
friendly_name: "Bedroom Temperature"
|
|
||||||
|
|
||||||
sensor.bedroom_weather_pressure:
|
|
||||||
friendly_name: "Bedroom Pressure"
|
|
||||||
|
|
||||||
sensor.bedroom_weather_humidity:
|
|
||||||
friendly_name: "Bedroom Humidity"
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
binary_sensor.living_room_right_window_on_off:
|
|
||||||
friendly_name: "Living Room Window Sensor"
|
|
||||||
|
|
||||||
sensor.living_room_right_window_power:
|
|
||||||
friendly_name: "Living Room Window Battery"
|
|
||||||
|
|
||||||
binary_sensor.bedroom_right_window_on_off:
|
|
||||||
friendly_name: "Bedroom Window Sensor"
|
|
||||||
|
|
||||||
sensor.bedroom_right_window_power:
|
|
||||||
friendly_name: "Bedroom Window Battery"
|
|
||||||
|
|
||||||
binary_sensor.front_door_on_off:
|
|
||||||
friendly_name: "Front Door Sensor"
|
|
||||||
|
|
||||||
sensor.front_door_power:
|
|
||||||
friendly_name: "Front Door Battery"
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
# https://www.home-assistant.io/integrations/input_boolean
|
|
||||||
|
|
||||||
georgi_home:
|
|
||||||
name: Georgi Home
|
|
||||||
icon: mdi:account
|
|
||||||
|
|
||||||
sleep_mode:
|
|
||||||
name: Sleep Mode
|
|
||||||
initial: off
|
|
||||||
icon: mdi:sleep
|
|
||||||
|
|
||||||
guest_mode:
|
|
||||||
name: Guest Mode
|
|
||||||
initial: off
|
|
||||||
icon: mdi:human-greeting
|
|
||||||
|
|
||||||
domestina:
|
|
||||||
name: Domestina Time
|
|
||||||
icon: mdi:broom
|
|
||||||
|
|
||||||
speech_notifications:
|
|
||||||
name: Speech Notifications
|
|
||||||
initial: on
|
|
||||||
icon: mdi:chat
|
|
||||||
-19
@@ -1,19 +0,0 @@
|
|||||||
# https://www.home-assistant.io/integrations/light
|
|
||||||
# https://www.home-assistant.io/integrations/light.group/
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Living Room Main Lights
|
|
||||||
entities:
|
|
||||||
- light.living_room_1
|
|
||||||
- light.living_room_2
|
|
||||||
- light.living_room_3
|
|
||||||
- light.living_room_4
|
|
||||||
|
|
||||||
- platform: group
|
|
||||||
name: Living Room All Lights
|
|
||||||
entities:
|
|
||||||
- light.living_room_1
|
|
||||||
- light.living_room_2
|
|
||||||
- light.living_room_3
|
|
||||||
- light.living_room_4
|
|
||||||
- light.pc
|
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
binary_sensor:
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
camera_state:
|
||||||
|
friendly_name: Security Camera
|
||||||
|
device_class: safety
|
||||||
|
value_template: >-
|
||||||
|
{{ state_attr('camera.amcrest_camera', 'motion_recording') != 'on' }}
|
||||||
|
|
||||||
|
switch:
|
||||||
|
- platform: template
|
||||||
|
switches:
|
||||||
|
camera:
|
||||||
|
friendly_name: Security Camera
|
||||||
|
value_template: "{{ state_attr('camera.amcrest_camera', 'motion_recording') == 'on' }}"
|
||||||
|
icon_template: >
|
||||||
|
{% if state_attr('camera.amcrest_camera', 'motion_recording') == 'on' %} mdi:shield-home
|
||||||
|
{% else %} mdi:shield-off
|
||||||
|
{% endif %}
|
||||||
|
turn_on:
|
||||||
|
service: script.security_camera_on
|
||||||
|
turn_off:
|
||||||
|
service: script.security_camera_off
|
||||||
|
|
||||||
|
script:
|
||||||
|
security_camera_on:
|
||||||
|
alias: Security Camera - Turn on
|
||||||
|
sequence:
|
||||||
|
- service: camera.turn_on
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
- service: amcrest.goto_preset
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
data:
|
||||||
|
preset: 1
|
||||||
|
- service: amcrest.enable_motion_recording
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
- service: amcrest.enable_recording
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
- service: amcrest.enable_audio
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
|
||||||
|
security_camera_off:
|
||||||
|
alias: Security Camera - Turn off
|
||||||
|
sequence:
|
||||||
|
- service: amcrest.goto_preset
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
data:
|
||||||
|
preset: 3
|
||||||
|
- service: amcrest.disable_motion_recording
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
- service: amcrest.disable_recording
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
- service: amcrest.disable_audio
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
- service: camera.turn_off
|
||||||
|
entity_id: camera.amcrest_camera
|
||||||
|
|
||||||
|
# Hack - the switch.camera initial state is wrong (ON) when the server starts.
|
||||||
|
automation:
|
||||||
|
- id: camera_turn_off_on_startup
|
||||||
|
alias: Camera - Startup
|
||||||
|
trigger:
|
||||||
|
- platform: homeassistant
|
||||||
|
event: start
|
||||||
|
action:
|
||||||
|
- service: switch.turn_off
|
||||||
|
entity_id: switch.camera
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
# https://www.home-assistant.io/integrations/light
|
||||||
|
# https://www.home-assistant.io/integrations/light.group/
|
||||||
|
light:
|
||||||
|
- platform: group
|
||||||
|
name: Living Room Main Lights
|
||||||
|
entities:
|
||||||
|
- light.living_room_1
|
||||||
|
- light.living_room_2
|
||||||
|
- light.living_room_3
|
||||||
|
- light.living_room_4
|
||||||
|
|
||||||
|
- platform: group
|
||||||
|
name: Living Room All Lights
|
||||||
|
entities:
|
||||||
|
- light.living_room_1
|
||||||
|
- light.living_room_2
|
||||||
|
- light.living_room_3
|
||||||
|
- light.living_room_4
|
||||||
|
- light.pc
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
automation:
|
||||||
|
- id: cube_knock
|
||||||
|
alias: Magic Cube - Knock - Go to bed
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: sensor.cube_multistate_input
|
||||||
|
to: "knock"
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
|
||||||
|
- id: cube_shake
|
||||||
|
alias: Magic Cube - Shake - Wake up
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: sensor.cube_multistate_input
|
||||||
|
to: "shake"
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
|
||||||
|
#
|
||||||
|
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
customize:
|
||||||
|
sensor.cube_multistate_input:
|
||||||
|
friendly_name: "Cube Input"
|
||||||
|
|
||||||
|
sensor.cube_analog_input:
|
||||||
|
friendly_name: "Cube Rotation"
|
||||||
|
|
||||||
|
sensor.cube_power:
|
||||||
|
friendly_name: "Cube Battery"
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# Philips Purifier
|
||||||
|
fan:
|
||||||
|
platform: philips-airpurifier
|
||||||
|
host: !secret philips_purifier_ip
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
# Philips Purifier sensors
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
purifier_air_quality:
|
||||||
|
friendly_name: "Air quality"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.pm25 }}"
|
||||||
|
purifier_humidity:
|
||||||
|
friendly_name: "Humidity"
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.humidity }}"
|
||||||
|
purifier_temperature:
|
||||||
|
friendly_name: "Temperature"
|
||||||
|
unit_of_measurement: "°C"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.temperature }}"
|
||||||
|
purifier_speed:
|
||||||
|
friendly_name: "Speed"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.speed }}"
|
||||||
|
purifier_allergens:
|
||||||
|
friendly_name: "Allergen index"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.allergen_index }}"
|
||||||
|
purifier_mode:
|
||||||
|
friendly_name: "Mode"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.function }}"
|
||||||
|
purifier_pre_filter:
|
||||||
|
friendly_name: "Pre-filter"
|
||||||
|
unit_of_measurement: "Hrs"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.pre_filter }}"
|
||||||
|
purifier_wick_filter:
|
||||||
|
friendly_name: "Wick filter"
|
||||||
|
unit_of_measurement: "Hrs"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.wick_filter }}"
|
||||||
|
purifier_carbon_filter:
|
||||||
|
friendly_name: "Carbon filter"
|
||||||
|
unit_of_measurement: "Hrs"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.carbon_filter }}"
|
||||||
|
purifier_hepa_filter:
|
||||||
|
friendly_name: "HEPA filter"
|
||||||
|
unit_of_measurement: "Hrs"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.hepa_filter}}"
|
||||||
|
purifier_target_humidity:
|
||||||
|
friendly_name: "Target humidity"
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.target_humidity }}"
|
||||||
|
purifier_water_level:
|
||||||
|
friendly_name: "Water level"
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.water_level }}"
|
||||||
|
purifier_brightness:
|
||||||
|
friendly_name: "brightness"
|
||||||
|
unit_of_measurement: "%"
|
||||||
|
value_template: "{{ states.fan.philips_airpurifier.attributes.light_brightness }}"
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
# script:
|
||||||
# tv_chill:
|
# tv_chill:
|
||||||
# alias: TV Chill
|
# alias: TV Chill
|
||||||
# sequence:
|
# sequence:
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
input_boolean:
|
||||||
|
domestina:
|
||||||
|
name: Domestina Time
|
||||||
|
icon: mdi:broom
|
||||||
|
|
||||||
|
automation:
|
||||||
|
- alias: Domestina - Automate Start
|
||||||
|
trigger:
|
||||||
|
platform: time
|
||||||
|
at: "08:30:00"
|
||||||
|
condition:
|
||||||
|
- condition: time
|
||||||
|
weekday: thu
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.domestina
|
||||||
|
|
||||||
|
- alias: Domestina - Start
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: input_boolean.domestina
|
||||||
|
from: "off"
|
||||||
|
to: "on"
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
- service: automation.turn_off
|
||||||
|
entity_id:
|
||||||
|
- automation.cube_knock
|
||||||
|
- automation.cube_shake
|
||||||
|
|
||||||
|
- alias: Domestina - Automate End
|
||||||
|
trigger:
|
||||||
|
platform: time
|
||||||
|
at: "13:00:00"
|
||||||
|
condition:
|
||||||
|
- condition: time
|
||||||
|
weekday: thu
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.domestina
|
||||||
|
|
||||||
|
- alias: Domestina - End
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: input_boolean.domestina
|
||||||
|
from: "on"
|
||||||
|
to: "off"
|
||||||
|
action:
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
- service: automation.turn_on
|
||||||
|
entity_id:
|
||||||
|
- automation.cube_knock
|
||||||
|
- automation.cube_shake
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
input_boolean:
|
||||||
|
guest_mode:
|
||||||
|
name: Guest Mode
|
||||||
|
initial: off
|
||||||
|
icon: mdi:human-greeting
|
||||||
|
|
||||||
|
automation:
|
||||||
|
- id: enable_guest_mode
|
||||||
|
alias: Guest Mode - Enable
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
from: "off"
|
||||||
|
to: "on"
|
||||||
|
action:
|
||||||
|
- service: automation.turn_off
|
||||||
|
entity_id:
|
||||||
|
- automation.leaving_home
|
||||||
|
- automation.coming_home
|
||||||
|
- service: input_boolean.turn_off
|
||||||
|
entity_id: input_boolean.speech_notifications
|
||||||
|
|
||||||
|
- id: disable_guest_mode
|
||||||
|
alias: Guest Mode - Disable
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: input_boolean.guest_mode
|
||||||
|
from: "on"
|
||||||
|
to: "off"
|
||||||
|
action:
|
||||||
|
- service: automation.turn_on
|
||||||
|
entity_id:
|
||||||
|
- automation.leaving_home
|
||||||
|
- automation.coming_home
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.speech_notifications
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
input_boolean:
|
||||||
|
sleep_mode:
|
||||||
|
name: Sleep Mode
|
||||||
|
initial: off
|
||||||
|
icon: mdi:sleep
|
||||||
|
|
||||||
|
automation:
|
||||||
|
- id: enable_sleep_mode
|
||||||
|
alias: Sleep Mode - Enable
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
from: "off"
|
||||||
|
to: "on"
|
||||||
|
action:
|
||||||
|
- service: media_player.media_stop
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
- service: fan.turn_on
|
||||||
|
entity_id: fan.philips_airpurifier
|
||||||
|
- service: media_player.turn_off
|
||||||
|
entity_id:
|
||||||
|
- media_player.living_room_tv
|
||||||
|
- media_player.living_room_tv_2
|
||||||
|
- service: light.turn_off
|
||||||
|
entity_id: light.living_room_all_lights
|
||||||
|
- delay: "00:00:02"
|
||||||
|
- service: media_player.volume_set
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
data:
|
||||||
|
volume_level: 0.1
|
||||||
|
- service: script.say_discretely
|
||||||
|
data:
|
||||||
|
message: "Entering sleep mode. Good night!"
|
||||||
|
|
||||||
|
- id: disable_sleep_mode
|
||||||
|
alias: Sleep Mode - Disable
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
from: "on"
|
||||||
|
to: "off"
|
||||||
|
action:
|
||||||
|
- service: media_player.volume_set
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
data:
|
||||||
|
volume_level: 0.3
|
||||||
|
- service: script.sarah_briefing
|
||||||
|
- delay: "00:00:25"
|
||||||
|
- service: script.talk
|
||||||
|
data:
|
||||||
|
message: "Here's some music to start the day!"
|
||||||
|
- delay: "00:00:02"
|
||||||
|
- service: media_player.select_source
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
data:
|
||||||
|
source: "Evening Chill"
|
||||||
|
- service: fan.turn_off
|
||||||
|
entity_id: fan.philips_airpurifier
|
||||||
@@ -0,0 +1,162 @@
|
|||||||
|
#
|
||||||
|
# ─── CONFIGURATION ──────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
# https://www.home-assistant.io/components/person
|
||||||
|
person:
|
||||||
|
- name: Georgi
|
||||||
|
id: !secret georgi_user_id
|
||||||
|
user_id: !secret georgi_user_id
|
||||||
|
device_trackers:
|
||||||
|
- device_tracker.carbon
|
||||||
|
|
||||||
|
# https://www.home-assistant.io/integrations/device_tracker
|
||||||
|
device_tracker:
|
||||||
|
- platform: tile
|
||||||
|
username: !secret tile_username
|
||||||
|
password: !secret tile_password
|
||||||
|
|
||||||
|
# https://www.home-assistant.io/components/zone
|
||||||
|
zone:
|
||||||
|
- name: Home
|
||||||
|
latitude: !secret home_latitude
|
||||||
|
longitude: !secret home_longitude
|
||||||
|
radius: 20
|
||||||
|
icon: mdi:home
|
||||||
|
|
||||||
|
- name: Work
|
||||||
|
latitude: !secret work_latitude
|
||||||
|
longitude: !secret work_longitude
|
||||||
|
radius: 60
|
||||||
|
icon: mdi:worker
|
||||||
|
|
||||||
|
#
|
||||||
|
# ─── ENTITIES ───────────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
input_boolean:
|
||||||
|
georgi_home:
|
||||||
|
name: Georgi Home
|
||||||
|
icon: mdi:account
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
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 %}
|
||||||
|
|
||||||
|
automation:
|
||||||
|
# When my state changes to "home", wait for 15 minutes for the door to be opened, and then mark me as home
|
||||||
|
- id: arrival_detecion
|
||||||
|
alias: Presence - Arrival Detection
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: person.georgi
|
||||||
|
to: "home"
|
||||||
|
condition:
|
||||||
|
condition: state
|
||||||
|
entity_id: input_boolean.georgi_home
|
||||||
|
state: "off"
|
||||||
|
action:
|
||||||
|
- service: script.telegram_say
|
||||||
|
data:
|
||||||
|
message: "Device marked as home. Waiting for door to open!"
|
||||||
|
- wait_template: "{{ is_state('binary_sensor.front_door_on_off', 'on') }}"
|
||||||
|
continue_on_timeout: false
|
||||||
|
timeout: 00:15:00
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.georgi_home
|
||||||
|
- service: script.telegram_say
|
||||||
|
data:
|
||||||
|
message: "Hey, I've marked you as home now!"
|
||||||
|
|
||||||
|
- id: leaving_home
|
||||||
|
alias: Presence - Leaving home
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
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
|
||||||
|
entity_id: input_boolean.speech_notifications
|
||||||
|
|
||||||
|
- id: coming_home
|
||||||
|
alias: Presence - Coming Home
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: person.georgi
|
||||||
|
to: "home"
|
||||||
|
action:
|
||||||
|
- service: script.security_camera_off
|
||||||
|
- service: light.turn_on
|
||||||
|
entity_id: light.living_room_all_lights
|
||||||
|
- service: input_boolean.turn_on
|
||||||
|
entity_id: input_boolean.speech_notifications
|
||||||
|
|
||||||
|
- id: coming_home_welcome
|
||||||
|
alias: Presence - Coming Home - Play welcome music
|
||||||
|
trigger:
|
||||||
|
platform: state
|
||||||
|
entity_id: person.georgi
|
||||||
|
to: "home"
|
||||||
|
action:
|
||||||
|
- service: media_player.shuffle_set
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
data:
|
||||||
|
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
|
||||||
|
|
||||||
|
#
|
||||||
|
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
customize:
|
||||||
|
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
|
||||||
|
|
||||||
|
automation.coming_home:
|
||||||
|
icon: mdi:home-account
|
||||||
|
|
||||||
|
automation.leaving_home:
|
||||||
|
icon: mdi:home
|
||||||
|
|
||||||
|
automation.arrival_detecion:
|
||||||
|
icon: mdi:account-plus-outline
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
binary_sensor:
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
front_door_on_off_wrapper:
|
||||||
|
friendly_name: Front Door
|
||||||
|
device_class: door
|
||||||
|
value_template: "{{ is_state('binary_sensor.front_door_on_off', 'on') }}"
|
||||||
|
entity_id: binary_sensor.front_door_on_off
|
||||||
|
icon_template: >
|
||||||
|
{% if is_state('binary_sensor.front_door_on_off', 'on') %} mdi:door-open
|
||||||
|
{% else %} mdi:door-closed
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
#
|
||||||
|
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
customize:
|
||||||
|
binary_sensor.front_door_on_off:
|
||||||
|
friendly_name: "Front Door Sensor"
|
||||||
|
|
||||||
|
sensor.front_door_power:
|
||||||
|
friendly_name: "Front Door Battery"
|
||||||
@@ -0,0 +1,40 @@
|
|||||||
|
binary_sensor:
|
||||||
|
- platform: template
|
||||||
|
sensors:
|
||||||
|
living_room_right_window_on_off_wrapper:
|
||||||
|
friendly_name: Living Room Window
|
||||||
|
device_class: window
|
||||||
|
value_template: "{{ is_state('binary_sensor.living_room_right_window_on_off', 'on') }}"
|
||||||
|
entity_id: binary_sensor.living_room_right_window_on_off
|
||||||
|
icon_template: >
|
||||||
|
{% if is_state('binary_sensor.living_room_right_window_on_off', 'on') %} mdi:window-open-variant
|
||||||
|
{% else %} mdi:window-closed-variant
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
bedroom_right_window_on_off_wrapper:
|
||||||
|
friendly_name: Bedroom Window
|
||||||
|
device_class: window
|
||||||
|
value_template: "{{ is_state('binary_sensor.bedroom_right_window_on_off', 'on') }}"
|
||||||
|
entity_id: binary_sensor.bedroom_right_window_on_off
|
||||||
|
icon_template: >
|
||||||
|
{% if is_state('binary_sensor.bedroom_right_window_on_off', 'on') %} mdi:window-open-variant
|
||||||
|
{% else %} mdi:window-closed-variant
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
#
|
||||||
|
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
customize:
|
||||||
|
binary_sensor.living_room_right_window_on_off:
|
||||||
|
friendly_name: "Living Room Window Sensor"
|
||||||
|
|
||||||
|
sensor.living_room_right_window_power:
|
||||||
|
friendly_name: "Living Room Window Battery"
|
||||||
|
|
||||||
|
binary_sensor.bedroom_right_window_on_off:
|
||||||
|
friendly_name: "Bedroom Window Sensor"
|
||||||
|
|
||||||
|
sensor.bedroom_right_window_power:
|
||||||
|
friendly_name: "Bedroom Window Battery"
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
sensor:
|
||||||
|
- platform: launch_library
|
||||||
|
- platform: moon
|
||||||
|
|
||||||
|
binary_sensor:
|
||||||
|
# https://www.home-assistant.io/integrations/iss/
|
||||||
|
- platform: iss
|
||||||
|
show_on_map: true
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
input_boolean:
|
||||||
|
speech_notifications:
|
||||||
|
name: Speech Notifications
|
||||||
|
initial: on
|
||||||
|
icon: mdi:chat
|
||||||
|
|
||||||
|
script:
|
||||||
|
# Predefined Speech
|
||||||
|
sarah_briefing:
|
||||||
|
alias: Speech - Briefing
|
||||||
|
sequence:
|
||||||
|
- service: script.talk
|
||||||
|
data_template:
|
||||||
|
message: !include ../templates/briefing.yaml
|
||||||
|
|
||||||
|
# Public Scripts
|
||||||
|
talk:
|
||||||
|
alias: Speech - Talk
|
||||||
|
sequence:
|
||||||
|
- condition: state
|
||||||
|
entity_id: input_boolean.sleep_mode
|
||||||
|
state: "off"
|
||||||
|
- service: script.say_discretely
|
||||||
|
data_template:
|
||||||
|
message: "{{ message }}"
|
||||||
|
|
||||||
|
say_discretely:
|
||||||
|
alias: Speech - Say discretely
|
||||||
|
sequence:
|
||||||
|
- service_template: >
|
||||||
|
{% if is_state('media_player.master_bedroom', 'playing')
|
||||||
|
or is_state('input_boolean.speech_notifications', 'off') %}
|
||||||
|
script.telegram_say
|
||||||
|
{% else %}
|
||||||
|
script.sonos_blast
|
||||||
|
{% endif %}
|
||||||
|
data_template:
|
||||||
|
message: "{{ message }}"
|
||||||
|
|
||||||
|
telegram_say:
|
||||||
|
alias: Speech - Telegram say
|
||||||
|
sequence:
|
||||||
|
- service: notify.telegram
|
||||||
|
data_template:
|
||||||
|
message: "{{ message }}"
|
||||||
|
|
||||||
|
sonos_blast:
|
||||||
|
alias: Speech - Sonos blast
|
||||||
|
sequence:
|
||||||
|
- service: tts.amazon_polly_say
|
||||||
|
data_template:
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
message: "{{ message }}"
|
||||||
|
|
||||||
|
sonos_say:
|
||||||
|
alias: Speech - Sonos say
|
||||||
|
sequence:
|
||||||
|
- service: sonos.snapshot
|
||||||
|
data_template:
|
||||||
|
with_group: yes
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
|
- delay: "00:00:02"
|
||||||
|
- service: script.sonos_blast
|
||||||
|
data_template:
|
||||||
|
message: "{{ message }}"
|
||||||
|
- delay: "00:00:05"
|
||||||
|
- service: sonos.restore
|
||||||
|
data_template:
|
||||||
|
with_group: yes
|
||||||
|
entity_id: media_player.master_bedroom
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
script:
|
||||||
|
sarah_restart:
|
||||||
|
alias: System - Restart SARAH
|
||||||
|
sequence:
|
||||||
|
service: homeassistant.restart
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
# https://www.home-assistant.io/integrations/weather.darksky
|
||||||
|
weather:
|
||||||
|
- platform: darksky
|
||||||
|
api_key: !secret darksky_key
|
||||||
|
mode: daily
|
||||||
|
|
||||||
|
sensor:
|
||||||
|
- platform: darksky
|
||||||
|
api_key: !secret darksky_key
|
||||||
|
scan_interval: "00:15:00"
|
||||||
|
forecast:
|
||||||
|
- 0
|
||||||
|
- 1
|
||||||
|
- 2
|
||||||
|
- 3
|
||||||
|
- 4
|
||||||
|
- 5
|
||||||
|
- 6
|
||||||
|
monitored_conditions:
|
||||||
|
- summary
|
||||||
|
- minutely_summary
|
||||||
|
- hourly_summary
|
||||||
|
- daily_summary
|
||||||
|
- precip_type
|
||||||
|
- precip_intensity
|
||||||
|
- precip_intensity_max
|
||||||
|
- precip_probability
|
||||||
|
- precip_accumulation
|
||||||
|
- temperature
|
||||||
|
- temperature_high
|
||||||
|
- temperature_low
|
||||||
|
- apparent_temperature
|
||||||
|
- apparent_temperature_high
|
||||||
|
- apparent_temperature_low
|
||||||
|
- wind_speed
|
||||||
|
- wind_gust
|
||||||
|
- wind_bearing
|
||||||
|
- cloud_cover
|
||||||
|
- dew_point
|
||||||
|
- visibility
|
||||||
|
- icon
|
||||||
|
- humidity
|
||||||
|
- pressure
|
||||||
|
- ozone
|
||||||
|
- uv_index
|
||||||
|
- nearest_storm_distance
|
||||||
|
- nearest_storm_bearing
|
||||||
|
- alerts
|
||||||
|
|
||||||
|
#
|
||||||
|
# ─── CUSTOMIZATION ──────────────────────────────────────────────────────────────
|
||||||
|
#
|
||||||
|
|
||||||
|
homeassistant:
|
||||||
|
customize:
|
||||||
|
sensor.bedroom_weather_power:
|
||||||
|
friendly_name: "Bedroom Weather Battery"
|
||||||
|
|
||||||
|
sensor.bedroom_weather_temperature:
|
||||||
|
friendly_name: "Bedroom Temperature"
|
||||||
|
|
||||||
|
sensor.bedroom_weather_pressure:
|
||||||
|
friendly_name: "Bedroom Pressure"
|
||||||
|
|
||||||
|
sensor.bedroom_weather_humidity:
|
||||||
|
friendly_name: "Bedroom Humidity"
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
security_camera_on:
|
|
||||||
alias: Security Camera - Turn on
|
|
||||||
sequence:
|
|
||||||
- service: camera.turn_on
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
- service: amcrest.goto_preset
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
data:
|
|
||||||
preset: 1
|
|
||||||
- service: amcrest.enable_motion_recording
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
- service: amcrest.enable_recording
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
- service: amcrest.enable_audio
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
|
|
||||||
security_camera_off:
|
|
||||||
alias: Security Camera - Turn off
|
|
||||||
sequence:
|
|
||||||
- service: amcrest.goto_preset
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
data:
|
|
||||||
preset: 3
|
|
||||||
- service: amcrest.disable_motion_recording
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
- service: amcrest.disable_recording
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
- service: amcrest.disable_audio
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
- service: camera.turn_off
|
|
||||||
entity_id: camera.amcrest_camera
|
|
||||||
@@ -1,65 +0,0 @@
|
|||||||
# ─── PREDEFINED SPEECH ──────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
sarah_briefing:
|
|
||||||
alias: Speech - Briefing
|
|
||||||
sequence:
|
|
||||||
- service: script.talk
|
|
||||||
data_template:
|
|
||||||
message: !include ../templates/briefing.yaml
|
|
||||||
|
|
||||||
# ─── Public Scripts ─────────────────────────────────────────────────────────────
|
|
||||||
|
|
||||||
talk:
|
|
||||||
alias: Speech - Talk
|
|
||||||
sequence:
|
|
||||||
- condition: state
|
|
||||||
entity_id: input_boolean.sleep_mode
|
|
||||||
state: "off"
|
|
||||||
- service: script.say_discretely
|
|
||||||
data_template:
|
|
||||||
message: "{{ message }}"
|
|
||||||
|
|
||||||
say_discretely:
|
|
||||||
alias: Speech - Say discretely
|
|
||||||
sequence:
|
|
||||||
- service_template: >
|
|
||||||
{% if is_state('media_player.master_bedroom', 'playing')
|
|
||||||
or is_state('input_boolean.speech_notifications', 'off') %}
|
|
||||||
script.telegram_say
|
|
||||||
{% else %}
|
|
||||||
script.sonos_blast
|
|
||||||
{% endif %}
|
|
||||||
data_template:
|
|
||||||
message: "{{ message }}"
|
|
||||||
|
|
||||||
telegram_say:
|
|
||||||
alias: Speech - Telegram say
|
|
||||||
sequence:
|
|
||||||
- service: notify.telegram
|
|
||||||
data_template:
|
|
||||||
message: "{{ message }}"
|
|
||||||
|
|
||||||
sonos_blast:
|
|
||||||
alias: Speech - Sonos blast
|
|
||||||
sequence:
|
|
||||||
- service: tts.amazon_polly_say
|
|
||||||
data_template:
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
message: "{{ message }}"
|
|
||||||
|
|
||||||
sonos_say:
|
|
||||||
alias: Speech - Sonos say
|
|
||||||
sequence:
|
|
||||||
- service: sonos.snapshot
|
|
||||||
data_template:
|
|
||||||
with_group: yes
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
- delay: "00:00:02"
|
|
||||||
- service: script.sonos_blast
|
|
||||||
data_template:
|
|
||||||
message: "{{ message }}"
|
|
||||||
- delay: "00:00:05"
|
|
||||||
- service: sonos.restore
|
|
||||||
data_template:
|
|
||||||
with_group: yes
|
|
||||||
entity_id: media_player.master_bedroom
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
sarah_restart:
|
|
||||||
alias: System - Restart SARAH
|
|
||||||
sequence:
|
|
||||||
service: homeassistant.restart
|
|
||||||
-100
@@ -1,100 +0,0 @@
|
|||||||
# Youtube sensor
|
|
||||||
- platform: youtube
|
|
||||||
channel_id: UClFSU9_bUb4Rc6OYfTt5SPw
|
|
||||||
|
|
||||||
- platform: launch_library
|
|
||||||
- platform: moon
|
|
||||||
|
|
||||||
- platform: darksky
|
|
||||||
api_key: !secret darksky_key
|
|
||||||
scan_interval: "00:15:00"
|
|
||||||
forecast:
|
|
||||||
- 0
|
|
||||||
- 1
|
|
||||||
- 2
|
|
||||||
- 3
|
|
||||||
- 4
|
|
||||||
- 5
|
|
||||||
- 6
|
|
||||||
monitored_conditions:
|
|
||||||
- summary
|
|
||||||
- minutely_summary
|
|
||||||
- hourly_summary
|
|
||||||
- daily_summary
|
|
||||||
- precip_type
|
|
||||||
- precip_intensity
|
|
||||||
- precip_intensity_max
|
|
||||||
- precip_probability
|
|
||||||
- precip_accumulation
|
|
||||||
- temperature
|
|
||||||
- temperature_high
|
|
||||||
- temperature_low
|
|
||||||
- apparent_temperature
|
|
||||||
- apparent_temperature_high
|
|
||||||
- apparent_temperature_low
|
|
||||||
- wind_speed
|
|
||||||
- wind_gust
|
|
||||||
- wind_bearing
|
|
||||||
- cloud_cover
|
|
||||||
- dew_point
|
|
||||||
- visibility
|
|
||||||
- icon
|
|
||||||
- humidity
|
|
||||||
- pressure
|
|
||||||
- ozone
|
|
||||||
- uv_index
|
|
||||||
- nearest_storm_distance
|
|
||||||
- nearest_storm_bearing
|
|
||||||
- alerts
|
|
||||||
|
|
||||||
# Philips Purifier sensors
|
|
||||||
- platform: template
|
|
||||||
sensors:
|
|
||||||
purifier_air_quality:
|
|
||||||
friendly_name: "Air quality"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.pm25 }}"
|
|
||||||
purifier_humidity:
|
|
||||||
friendly_name: "Humidity"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.humidity }}"
|
|
||||||
purifier_temperature:
|
|
||||||
friendly_name: "Temperature"
|
|
||||||
unit_of_measurement: "°C"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.temperature }}"
|
|
||||||
purifier_speed:
|
|
||||||
friendly_name: "Speed"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.speed }}"
|
|
||||||
purifier_allergens:
|
|
||||||
friendly_name: "Allergen index"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.allergen_index }}"
|
|
||||||
purifier_mode:
|
|
||||||
friendly_name: "Mode"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.function }}"
|
|
||||||
purifier_pre_filter:
|
|
||||||
friendly_name: "Pre-filter"
|
|
||||||
unit_of_measurement: "Hrs"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.pre_filter }}"
|
|
||||||
purifier_wick_filter:
|
|
||||||
friendly_name: "Wick filter"
|
|
||||||
unit_of_measurement: "Hrs"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.wick_filter }}"
|
|
||||||
purifier_carbon_filter:
|
|
||||||
friendly_name: "Carbon filter"
|
|
||||||
unit_of_measurement: "Hrs"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.carbon_filter }}"
|
|
||||||
purifier_hepa_filter:
|
|
||||||
friendly_name: "HEPA filter"
|
|
||||||
unit_of_measurement: "Hrs"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.hepa_filter}}"
|
|
||||||
purifier_target_humidity:
|
|
||||||
friendly_name: "Target humidity"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.target_humidity }}"
|
|
||||||
purifier_water_level:
|
|
||||||
friendly_name: "Water level"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.water_level }}"
|
|
||||||
purifier_brightness:
|
|
||||||
friendly_name: "brightness"
|
|
||||||
unit_of_measurement: "%"
|
|
||||||
value_template: "{{ states.fan.philips_airpurifier.attributes.light_brightness }}"
|
|
||||||
-15
@@ -1,15 +0,0 @@
|
|||||||
# https://www.home-assistant.io/integrations/switch
|
|
||||||
|
|
||||||
- platform: template
|
|
||||||
switches:
|
|
||||||
camera:
|
|
||||||
friendly_name: "Security Camera"
|
|
||||||
value_template: "{{ state_attr('camera.amcrest_camera', 'motion_recording') == 'on' }}"
|
|
||||||
icon_template: >
|
|
||||||
{% if state_attr('camera.amcrest_camera', 'motion_recording') == 'on' %} mdi:shield-home
|
|
||||||
{% else %} mdi:shield-off
|
|
||||||
{% endif %}
|
|
||||||
turn_on:
|
|
||||||
service: script.security_camera_on
|
|
||||||
turn_off:
|
|
||||||
service: script.security_camera_off
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
# https://www.home-assistant.io/components/zone
|
|
||||||
|
|
||||||
- name: Home
|
|
||||||
latitude: !secret home_latitude
|
|
||||||
longitude: !secret home_longitude
|
|
||||||
radius: 20
|
|
||||||
icon: mdi:home
|
|
||||||
|
|
||||||
- name: Work
|
|
||||||
latitude: !secret work_latitude
|
|
||||||
longitude: !secret work_longitude
|
|
||||||
radius: 60
|
|
||||||
icon: mdi:worker
|
|
||||||
Reference in New Issue
Block a user