Move config to a subfolder

This commit is contained in:
2020-03-20 02:08:56 +02:00
parent badd728c82
commit 69bf7ac509
54 changed files with 5 additions and 89 deletions
+237
View File
@@ -0,0 +1,237 @@
homeassistant:
name: Sarah
latitude: !secret home_latitude
longitude: !secret home_longitude
elevation: !secret home_elevation
unit_system: metric
time_zone: Europe/Sofia
packages: !include_dir_named packages
#
# ─── HOME ASSISTANT COMPONENTS ENABLED ──────────────────────────────────────────
#
# https://www.home-assistant.io/components/config
config:
# https://home-assistant.io/components/http
http:
login_attempts_threshold: 20
lovelace:
mode: yaml
resources:
- type: js
url: /hacsfiles/travel-time-card/travel-time-card.js
- type: module
url: /hacsfiles/lovelace-gui-sandbox/gui-sandbox.js
- type: module
url: /hacsfiles/lovelace-swipe-navigation/swipe-navigation.js
- type: module
url: /hacsfiles/lovelace-card-mod/card-mod.js
- type: js
url: /hacsfiles/light-entity-card/light-entity-card.js
- type: module
url: /hacsfiles/weather-card/weather-card.js
- type: module
url: /hacsfiles/custom-header/custom-header.js
- type: module
url: /hacsfiles/mini-graph-card/mini-graph-card-bundle.js
- type: module
url: /hacsfiles/mini-media-player/mini-media-player-bundle.js
- type: module
url: /hacsfiles/aftership-card/aftership-card.js
- type: module
url: /hacsfiles/config-template-card/config-template-card.js
- type: module
url: /hacsfiles/lovelace-fold-entity-row/fold-entity-row.js
- type: module
url: /hacsfiles/lovelace-dummy-entity-row/dummy-entity-row.js
- type: module
url: /hacsfiles/lovelace-slider-entity-row/slider-entity-row.js
- type: module
url: /hacsfiles/lovelace-text-input-row/lovelace-text-input-row.js
- type: module
url: /hacsfiles/text-element/text-element.js
- type: module
url: /hacsfiles/lovelace-battery-entity/battery-entity.js
- type: module
url: /hacsfiles/lovelace-multiple-entity-row/multiple-entity-row.js
- type: module
url: /hacsfiles/decluttering-card/decluttering-card.js
dashboards:
lovelace-yaml:
mode: yaml
title: YAML
icon: mdi:script
show_in_sidebar: true
filename: ui-lovelace.yaml
# https://www.home-assistant.io/components/logbook
logbook:
# https://www.home-assistant.io/components/map
map:
# https://www.home-assistant.io/components/system_health
system_health:
# https://www.home-assistant.io/components/updater
updater:
reporting: false
# https://www.home-assistant.io/components/logger
logger:
default: warning
logs:
homeassistant.components.shell_command: debug
homeassistant.components.amcrest: error
zigpy.util: error
#
# ─── INTEGRATIONS ───────────────────────────────────────────────────────────────
#
# https://www.home-assistant.io/integrations/amcrest
amcrest:
- host: !secret amcrest_ip
username: !secret amcrest_username
password: !secret amcrest_password
resolution: low
binary_sensors:
- motion_detected
- online
discovery:
ignore:
- yeelight
# https://www.home-assistant.io/integrations/ffmpeg
ffmpeg:
# https://www.home-assistant.io/integrations/frontend
frontend:
themes: !include_dir_merge_named themes
# https://www.home-assistant.io/integrations/calendar.google
google:
client_id: !secret google_client_id
client_secret: !secret google_client_secret
# https://www.home-assistant.io/integrations/history
history:
# https://www.home-assistant.io/integrations/media_extractor
media_extractor:
# https://www.home-assistant.io/integrations/mobile_app
mobile_app:
# https://www.home-assistant.io/docs/mqtt
mqtt:
broker: !secret mqtt_ip
client_id: homeassistant
username: !secret mqtt_username
password: !secret mqtt_password
# https://www.home-assistant.io/integrations/notify
notify:
- name: telegram
platform: telegram
api_key: !secret telegram_token
chat_id: !secret telegram_georgi_chat_id
# https://www.home-assistant.io/integrations/plex
plex:
host: !secret plex_host
token: !secret plex_token
ssl: true
verify_ssl: false
media_player:
use_episode_art: true
ignore_new_shared_users: false
# https://www.home-assistant.io/integrations/sonos
sonos:
media_player:
hosts: !secret sonos_hosts
# 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/telegram
# https://www.home-assistant.io/integrations/telegram_chatbot
telegram_bot:
- platform: polling
api_key: !secret telegram_token
allowed_chat_ids:
- !secret telegram_georgi_chat_id
# 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: us-east-1
voice: Amy
engine: neural
# https://www.home-assistant.io/integrations/wake_on_lan
wake_on_lan:
# https://www.home-assistant.io/integrations/webostv
webostv:
- host: !secret living_room_tv_ip
name: Living Room TV
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
mac: !secret living_room_tv_mac
# customize:
# sources:
# - livetv
# - youtube
# - makotv
# - netflix
yeelight:
devices:
!secret yeelight_bedside_ip:
name: Bedside light
# https://www.home-assistant.io/integrations/zeroconf
zeroconf:
# 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
# https://www.home-assistant.io/integrations/zha
zha:
usb_path: /dev/ttyUSB0
database_path: /config/zigbee.db
#
# ─── PLUGINS ────────────────────────────────────────────────────────────────────
#
spotcast:
username: !secret spotify_spotcast_username
password: !secret spotify_spotcast_password
hacs:
token: !secret hacs_github_token
appdaemon: true
uilogs:
+19
View File
@@ -0,0 +1,19 @@
#!/usr/bin/python3.7
import sys
import youtube_dl
import os
youtube_url = sys.argv[1]
out_name = sys.argv[2] if len(sys.argv) > 2 else 'temp'
out_folder = sys.argv[3] if len(sys.argv) > 3 else ''
full_file_path = f"""/config/www/audio/youtube/{out_folder}{out_name}"""
ydl = youtube_dl.YoutubeDL({'format': 'bestaudio', 'outtmpl': full_file_path})
with ydl:
result = ydl.extract_info(youtube_url, download=True)
os.system(
f"""ffmpeg -i {full_file_path} -acodec libmp3lame {full_file_path}.mp3""")
os.system(f"""rm {full_file_path}""")
+111
View File
@@ -0,0 +1,111 @@
title: Home
path: default_view
icon: "mdi:home"
badges: []
cards:
# Column 1: Active Controls
- type: vertical-stack
cards:
- type: glance
title: Lights
show_header_toggle: false
entities:
- entity: light.living_room_main_lights
name: Living room
tap_action:
action: call-service
service: light.toggle
service_data:
entity_id: light.living_room_main_lights
- entity: light.pc
tap_action:
action: call-service
service: light.toggle
service_data:
entity_id: light.pc
- entity: light.bedside_light
tap_action:
action: call-service
service: light.toggle
service_data:
entity_id: light.bedside_light
- type: entities
title: Devices
show_header_toggle: false
entities:
- switch.camera
- media_player.living_room_tv
- media_player.nvidia_shield
- fan.philips_airpurifier
- type: custom:config-template-card
entities:
- input_select.sonos_leader
card:
type: custom:decluttering-card
template: sonos_media_player
variables:
- player: ${states['input_select.sonos_leader'].state}
- type: entities
title: Manual Overrides
show_header_toggle: false
entities:
- input_select.sonos_leader
- input_boolean.speech_notifications
- input_boolean.guest_mode
- input_boolean.domestina
- input_boolean.sleep_mode
- input_boolean.georgi_home
# Column 2: Sensors
- type: vertical-stack
cards:
- type: entities
title: Sensors
show_header_toggle: false
entities:
- binary_sensor.front_door_on_off_wrapper
- binary_sensor.living_room_right_window_on_off_wrapper
- binary_sensor.bedroom_right_window_on_off_wrapper
- type: entities
title: Presence
show_header_toggle: false
entities:
- binary_sensor.georgi_home
- device_tracker.carbon
- device_tracker.tile_1bcb2b3021b9f96b
- type: entities
title: Misc Badges
show_header_toggle: false
entities:
- sun.sun
- sensor.carbon_battery_level
- sensor.carbon_steps
- binary_sensor.updater
# Column 3: Misc
- type: vertical-stack
cards:
- type: "custom:weather-card"
current: true
details: true
entity: weather.dark_sky
forecast: true
- type: "custom:aftership-card"
entity: sensor.aftership
title: Packages
- type: "custom:travel-time-card"
title: Travel time
columns:
- name
- duration
- distance
entities:
- sensor.home_to_work
- sensor.work_to_home
+105
View File
@@ -0,0 +1,105 @@
title: Living Room
path: living-room
icon: "mdi:sofa"
badges: []
cards:
- type: vertical-stack
cards:
- type: entities
title: Lights
show_header_toggle: false
entities:
- type: custom:slider-entity-row
entity: light.living_room_all_lights
name: All lights
toggle: true
step: 5
- type: custom:fold-entity-row
head:
entity: light.living_room_main_lights
name: Main lights
entities:
- type: custom:slider-entity-row
entity: light.living_room_main_lights
name: Brightness
hide_state: true
step: 5
- type: custom:slider-entity-row
entity: light.living_room_main_lights
name: Temperature
attribute: color_temp
hide_state: true
min: 153
max: 500
step: 5
- type: custom:decluttering-card
template: light_with_fade_and_switch
variables:
- light: light.living_room_1
- fade: switch.living_room_1_light_fade
- type: custom:decluttering-card
template: light_with_fade_and_switch
variables:
- light: light.living_room_2
- fade: switch.living_room_2_light_fade
- type: custom:decluttering-card
template: light_with_fade_and_switch
variables:
- light: light.living_room_3
- fade: switch.living_room_3_light_fade
- type: custom:decluttering-card
template: light_with_fade_and_switch
variables:
- light: light.living_room_4
- fade: switch.living_room_4_light_fade
- type: custom:fold-entity-row
head:
type: custom:decluttering-card
template: light_with_fade_and_switch
variables:
- light: light.pc
- fade: switch.pc_light_fade
entities:
- type: custom:slider-entity-row
entity: light.pc
name: Brightness
hide_state: true
step: 5
- type: custom:decluttering-card
template: sonos_media_player
variables:
- player: media_player.living_room
- type: "custom:mini-media-player"
entity: media_player.living_room_tv
- type: "custom:mini-media-player"
entity: media_player.playstation_4
- type: vertical-stack
cards:
- type: glance
title: Window
show_icon: true
show_name: false
show_state: true
entities:
- binary_sensor.living_room_right_window_on_off_wrapper
- sensor.living_room_right_window_power
- type: vertical-stack
cards:
- type: picture-entity
aspect_ratio: 50%
entity: camera.amcrest_camera
show_name: true
show_state: true
- type: entities
title: Camera Controls
show_header_toggle: false
entities:
- switch.camera
- binary_sensor.amcrest_camera_online
- binary_sensor.amcrest_camera_motion_detected
+107
View File
@@ -0,0 +1,107 @@
title: Master Bedroom
path: master-bedroom
icon: "mdi:bed-empty"
badges: []
cards:
- type: vertical-stack
cards:
- type: entities
title: Lights
entities:
- entity: light.bedside_light
show_header_toggle: false
- type: custom:decluttering-card
template: sonos_media_player
variables:
- player: media_player.master_bedroom
- type: vertical-stack
cards:
- type: glance
title: Window
show_name: false
entities:
- binary_sensor.bedroom_right_window_on_off_wrapper
- sensor.bedroom_right_window_power
- type: "custom:mini-graph-card"
animate: true
line_width: 3
points_per_hour: 1
show:
average: true
extrema: true
entities:
- entity: sensor.bedroom_weather_temperature
name: Temperature
- type: horizontal-stack
cards:
- type: "custom:mini-graph-card"
name: Humidity
font_size: 75
icon: "mdi:water"
line_color: green
line_width: 8
entities:
- sensor.bedroom_weather_humidity
- type: "custom:mini-graph-card"
name: Pressure
entities:
- sensor.bedroom_weather_pressure
font_size: 75
line_color: var(--accent-color)
line_width: 8
- type: "custom:mini-graph-card"
name: Air Quality
font_size: 75
icon: "mdi:weather-windy"
line_color: "#e74c3c"
line_width: 8
entities:
- sensor.purifier_air_quality
- type: vertical-stack
cards:
- type: entities
title: Air Purifier
show_header_toggle: false
entities:
- entity: fan.philips_airpurifier
name: Purifier Working
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sensor.purifier_air_quality
name: Sensors
icon: mdi:air-purifier
open: true
entities:
- sensor.purifier_air_quality
- sensor.purifier_allergens
- sensor.purifier_temperature
- sensor.purifier_humidity
- sensor.purifier_water_level
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sensor.purifier_speed
name: Mode
entities:
- sensor.purifier_speed
- sensor.purifier_mode
- sensor.purifier_brightness
- sensor.purifier_target_humidity
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sensor.purifier_pre_filter
name: Filters
entities:
- sensor.purifier_pre_filter
- sensor.purifier_hepa_filter
- sensor.purifier_carbon_filter
- sensor.purifier_wick_filter
+9
View File
@@ -0,0 +1,9 @@
title: Kitchen
path: kitchen
icon: "mdi:chef-hat"
badges: []
cards:
- type: custom:decluttering-card
template: sonos_media_player
variables:
- player: media_player.kitchen
+9
View File
@@ -0,0 +1,9 @@
title: Bathroom
path: bathroom
icon: "mdi:shower"
badges: []
cards:
- type: custom:decluttering-card
template: sonos_media_player
variables:
- player: media_player.bathroom
+61
View File
@@ -0,0 +1,61 @@
title: Media
path: media
panel: false
icon: mdi:play-circle-outline
badges: []
cards:
- type: entities
style: |
ha-icon {
color: red;
}
title: Youtube controls
icon: mdi:youtube
show_header_toggle: false
entities:
- entity: input_text.youtube_download_url
type: "custom:text-input-row"
- entity: input_text.youtube_download_name
type: "custom:text-input-row"
- type: horizontal-stack
cards:
- type: entity-button
entity: script.youtube_download_selected
name: Download
icon: mdi:download
icon_height: 48px
tap_action:
action: call-service
service: script.youtube_download_selected
- type: entity-button
entity: script.youtube_download_and_play
name: Download & Play
icon: mdi:youtube-tv
icon_height: 48px
tap_action:
action: call-service
service: script.youtube_download_and_play
- type: custom:config-template-card
entities:
- sensor.philip_defranco
- sensor.available_pds
card:
type: vertical-stack
cards:
- type: picture-entity
entity: sensor.philip_defranco
image: "${states['sensor.philip_defranco'].attributes.entity_picture}"
name: "Play the latest PDS"
show_state: false
tap_action:
action: call-service
service: script.youtube_play_latest_pds
- type: custom:text-element
text: "${states['sensor.philip_defranco'].state}"
- type: custom:text-element
text: "Available:"
- type: custom:text-element
text: "${states['sensor.available_pds'].state.split(',')}"
+124
View File
@@ -0,0 +1,124 @@
title: System
path: system
icon: "mdi:cogs"
badges: []
cards:
- type: entities
title: Automations
show_header_toggle: false
entities:
- automation.youtube_download_latest_pds
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: binary_sensor.georgi_home
name: Presence
open: true
entities:
- input_boolean.routine_welcome_home
- automation.presence_arrival_detection
- automation.presence_coming_home
- automation.presence_leaving_home
- automation.routine_coming_home_left_work
- automation.presence_leaving_work
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sun.sun
name: Lighting
icon: mdi:lightbulb
open: true
entities:
- automation.lighting_turn_on_all_lights_after_sunset
- automation.lighting_turn_off_all_lights_after_sunrise
- automation.lighting_master_bedroom_toggle_bedside_light_on_bedisde_switch_single_click
- automation.lighting_living_room_turn_all_lights_on_on_magic_cube_flip_90
- automation.lighting_living_room_turn_all_lights_off_on_magic_cube_flip_180
- automation.lighting_sync_tasmota_states_on_start_up
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sun.sun
name: Music
icon: mdi:music-note
open: true
entities:
- automation.music_play_pause_on_magic_cube_knock
- automation.music_volume_down_on_magic_cube_rotate_left
- automation.music_volume_up_on_magic_cube_rotate_right
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: input_boolean.sleep_mode
open: true
entities:
- automation.routine_bedtime_toggle_on_bedside_switch_hold
- automation.sleep_mode_enable
- automation.sleep_mode_disable
- automation.sleep_mode_toggle_on_bedside_switch_double_click
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: input_boolean.guest_mode
open: true
entities:
- automation.guest_mode_enable
- automation.guest_mode_disable
- automation.guest_mode_enable_from_telegram
- automation.guest_mode_disable_from_telegram
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: input_boolean.domestina
open: true
entities:
- automation.domestina_automate_start
- automation.domestina_start
- automation.domestina_automate_end
- automation.domestina_end
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sun.sun
name: Security
icon: mdi:shield-home
open: true
entities:
- automation.security_door_opened_while_away
- automation.camera_turn_off_on_startup
- type: custom:fold-entity-row
head:
type: custom:dummy-entity-row
entity: sun.sun
icon: mdi:cogs
name: System
open: true
entities:
- automation.system_announce_start
- automation.system_telegram_announce_status
- automation.speech_telegram_action_do_nothing
- type: entities
title: Batteries
show_header_toggle: false
entities:
- type: custom:battery-entity
entity: sensor.front_door_power
- type: custom:battery-entity
entity: sensor.living_room_right_window_power
- type: custom:battery-entity
entity: sensor.bedroom_right_window_power
- type: custom:battery-entity
entity: sensor.bedroom_weather_power
- type: custom:battery-entity
entity: sensor.cube_power
- type: custom:battery-entity
entity: sensor.master_bedroom_bedside_switch_power
+87
View File
@@ -0,0 +1,87 @@
title: COVID-19
path: covid-19
panel: false
icon: "mdi:biohazard"
badges: []
cards:
- type: vertical-stack
cards:
- type: glance
title: COVID-19 Worldwide
show_name: true
columns: 4
entities:
- entity: sensor.worldwide_coronavirus_confirmed
name: Confirmed
icon: "mdi:emoticon-confused-outline"
- entity: sensor.worldwide_coronavirus_current
name: Current
icon: "mdi:emoticon-sad-outline"
- entity: sensor.worldwide_coronavirus_deaths
name: Deaths
icon: "mdi:emoticon-cry-outline"
- entity: sensor.worldwide_coronavirus_recovered
name: Recovered
icon: "mdi:emoticon-cool-outline"
- type: "custom:mini-graph-card"
animate: true
icon: mdi:emoticon-confused
line_width: 3
line_color:
- var(--paper-orange-400)
- var(--paper-green-400)
- var(--accent-color)
hours_to_show: 168
points_per_hour: 0.04
entities:
- entity: sensor.worldwide_coronavirus_deaths
index: 0
name: Deaths
- entity: sensor.worldwide_coronavirus_recovered
index: 1
name: Recovered
- entity: sensor.worldwide_coronavirus_current
index: 2
name: Current
- type: vertical-stack
cards:
- type: glance
title: COVID-19 Bulgaria
show_name: true
columns: 4
entities:
- entity: sensor.bulgaria_coronavirus_confirmed
name: Confirmed
icon: "mdi:emoticon-confused-outline"
- entity: sensor.bulgaria_coronavirus_current
name: Current
icon: "mdi:emoticon-sad-outline"
- entity: sensor.bulgaria_coronavirus_deaths
name: Deaths
icon: "mdi:emoticon-cry-outline"
- entity: sensor.bulgaria_coronavirus_recovered
name: Recovered
icon: "mdi:emoticon-cool-outline"
- type: "custom:mini-graph-card"
animate: true
icon: mdi:emoticon-confused
line_width: 3
line_color:
- var(--accent-color)
- var(--paper-orange-400)
- var(--paper-green-400)
hours_to_show: 168
points_per_hour: 0.04
entities:
- entity: sensor.bulgaria_coronavirus_current
index: 0
name: Current
- entity: sensor.bulgaria_coronavirus_deaths
index: 1
name: Deaths
- entity: sensor.bulgaria_coronavirus_recovered
index: 2
name: Recovered
+98
View File
@@ -0,0 +1,98 @@
title: test
path: test
badges: []
cards:
- type: entities
entities:
- entity: sensor.cube_analog_input
- entity: sensor.cube_multistate_input
- entity: sensor.cube_power
- entity: sensor.carbon_activity
- entity: sensor.carbon_last_update_trigger
- type: "custom:light-entity-card"
brightness: true
brightness_icon: weather-sunny
color_picker: true
color_temp: true
color_wheel: true
effects_list: true
entity: light.pc
full_width_sliders: false
group: false
persist_features: false
show_slider_percent: false
smooth_color_wheel: true
temperature_icon: thermometer
white_icon: file-word-box
white_value: true
- type: "custom:light-entity-card"
brightness: true
brightness_icon: weather-sunny
color_picker: true
color_temp: true
color_wheel: true
effects_list: true
entity: light.bedside_light
full_width_sliders: false
group: false
show_slider_percent: true
smooth_color_wheel: true
temperature_icon: thermometer
white_icon: file-word-box
white_value: true
- type: "custom:mini-graph-card"
animate: true
entities:
- entity: sensor.purifier_temperature
index: 0
name: Purifier Temperature
- entity: sensor.bedroom_weather_temperature
index: 1
name: Weather Temperature
line_color:
- "#e74c3c"
- var(--accent-color)
line_width: 3
points_per_hour: 1
hours_to_show: 72
- type: "custom:mini-graph-card"
animate: true
entities:
- entity: sensor.purifier_humidity
index: 0
name: Purifier humidity
- entity: sensor.bedroom_weather_humidity
index: 1
name: Weather humidity
line_color:
- "#e74c3c"
- var(--accent-color)
line_width: 3
points_per_hour: 1
hours_to_show: 72
- type: entities
entities:
- binary_sensor.lumi_lumi_vibration_aq1_b8c6c402_ias_zone
- type: horizontal-stack
cards:
- type: button
tap_action:
action: call-service
service: script.alarm_start
name: start
icon: mdi:home-alert
- type: button
tap_action:
action: call-service
service: script.alarm_stop
name: stop
icon: mdi:home
- type: custom:gui-sandbox
+12
View File
@@ -0,0 +1,12 @@
light_with_fade_and_switch:
card:
type: custom:multiple-entity-row
entity: "[[light]]"
show_state: false
entities:
- entity: "[[fade]]"
name: Fade
toggle: true
- entity: "[[light]]"
name: Switch
toggle: true
@@ -0,0 +1,23 @@
sonos_media_player:
card:
type: custom:mini-media-player
artwork: cover
entity: "[[player]]"
speaker_group:
sync_volume: true
entities:
- entity_id: media_player.master_bedroom
name: Master Bedroom
- entity_id: media_player.living_room
name: Livingroom
- entity_id: media_player.kitchen
name: Kitchen
- entity_id: media_player.bathroom
name: Bathroom
hide:
power: true
icon: true
shuffle: false
idle_view:
when_idle: true
when_standby: true
+14
View File
@@ -0,0 +1,14 @@
#
# ─── 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
+69
View File
@@ -0,0 +1,69 @@
# Philips Purifier
# https://github.com/xMrVizzy/Philips-AirPurifier
fan:
platform: philips-airpurifier
host: !secret philips_purifier_ip
sensor:
- platform: template
sensors:
purifier_air_quality:
friendly_name: Air quality
value_template: "{{ states.fan.philips_airpurifier.attributes.pm25 }}"
icon_template: mdi:weather-windy
purifier_humidity:
friendly_name: Humidity
unit_of_measurement: "%"
value_template: "{{ states.fan.philips_airpurifier.attributes.humidity }}"
icon_template: mdi:water
purifier_temperature:
friendly_name: Temperature
unit_of_measurement: "°C"
value_template: "{{ states.fan.philips_airpurifier.attributes.temperature }}"
icon_template: mdi:thermometer
purifier_speed:
friendly_name: Speed
value_template: "{{ states.fan.philips_airpurifier.attributes.speed }}"
icon_template: mdi:speedometer
purifier_allergens:
friendly_name: Allergen index
value_template: "{{ states.fan.philips_airpurifier.attributes.allergen_index }}"
icon_template: mdi:weather-windy-variant
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 }}"
icon_template: mdi:air-filter
purifier_wick_filter:
friendly_name: Wick filter
unit_of_measurement: "Hrs"
value_template: "{{ states.fan.philips_airpurifier.attributes.wick_filter }}"
icon_template: mdi:air-filter
purifier_carbon_filter:
friendly_name: Carbon filter
unit_of_measurement: "Hrs"
value_template: "{{ states.fan.philips_airpurifier.attributes.carbon_filter }}"
icon_template: mdi:air-filter
purifier_hepa_filter:
friendly_name: HEPA filter
unit_of_measurement: "Hrs"
value_template: "{{ states.fan.philips_airpurifier.attributes.hepa_filter}}"
icon_template: mdi:air-filter
purifier_target_humidity:
friendly_name: Target humidity
unit_of_measurement: "%"
value_template: "{{ states.fan.philips_airpurifier.attributes.target_humidity }}"
icon_template: mdi:water
purifier_water_level:
friendly_name: Water level
unit_of_measurement: "%"
value_template: "{{ states.fan.philips_airpurifier.attributes.water_level }}"
icon_template: mdi:water-percent
purifier_brightness:
friendly_name: Brightness
unit_of_measurement: "%"
value_template: "{{ states.fan.philips_airpurifier.attributes.light_brightness }}"
icon_template: mdi:brightness-6
+7
View File
@@ -0,0 +1,7 @@
homeassistant:
customize:
sensor.master_bedroom_bedside_switch_power:
friendly_name: Master Bedroom bedside switch power
sensor.master_bedroom_bedside_switch_multistate_input:
friendly_name: Master Bedroom bedside switch raw input
+23
View File
@@ -0,0 +1,23 @@
media_player:
- platform: androidtv
name: nvidia shield
host: !secret nvidia_shield_host
script:
tv_chill:
alias: TV Chill
sequence:
- service: media_extractor.play_media
data:
entity_id: media_player.shield
media_content_id: "https://www.youtube.com/watch?v=UgHKb_7884o"
media_content_type: video/youtube
latest_pds:
alias: Play the latest PDS
sequence:
- service: media_extractor.play_media
data_template:
entity_id: media_player.shield
media_content_id: "{{ state_attr('sensor.philip_defranco', 'url') }}"
media_content_type: video/youtube
+69
View File
@@ -0,0 +1,69 @@
input_boolean:
domestina:
name: Domestina time
icon: mdi:broom
group:
domestina_disabled_automations:
- automation.presence_arrival_detection
- automation.presence_coming_home
- automation.routine_coming_home_left_work
- automation.presence_leaving_home
- automation.sleep_mode_enable
- automation.sleep_mode_disable
- automation.sleep_mode_toggle_on_bedside_switch_double_click
- automation.music_play_pause_on_magic_cube_knock
- automation.music_volume_down_on_magic_cube_rotate_left
- automation.music_volume_up_on_magic_cube_rotate_right
- automation.lighting_turn_on_all_lights_after_sunset
- automation.lighting_turn_off_all_lights_after_sunrise
- automation.lighting_living_room_turn_all_lights_on_on_magic_cube_flip_90
- automation.lighting_living_room_turn_all_lights_off_on_magic_cube_flip_180
- automation.routine_bedtime_toggle_on_bedside_switch_hold
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: group.domestina_disabled_automations
- 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: group.domestina_disabled_automations
+62
View File
@@ -0,0 +1,62 @@
input_boolean:
guest_mode:
name: Guest mode
initial: off
icon: mdi:human-greeting
automation:
- 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.presence_leaving_home
- automation.presence_coming_home
- service: input_boolean.turn_off
entity_id: input_boolean.speech_notifications
- 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.presence_leaving_home
- automation.presence_coming_home
- service: input_boolean.turn_on
entity_id: input_boolean.speech_notifications
- alias: Guest mode · Enable · From Telegram
trigger:
platform: event
event_type: telegram_command
event_data:
command: "/guest_mode_on"
action:
- service: input_boolean.turn_on
entity_id: input_boolean.guest_mode
- service: notify.telegram
data:
title: "⚙️ *System Module*"
message: "Okay, turning Guest mode on!"
- alias: Guest mode · Disable · From Telegram
trigger:
platform: event
event_type: telegram_command
event_data:
command: "/guest_mode_off"
action:
- service: input_boolean.turn_off
entity_id: input_boolean.guest_mode
- service: notify.telegram
data:
title: "⚙️ *System Module*"
message: "Okay, turning Guest mode off!"
+40
View File
@@ -0,0 +1,40 @@
input_boolean:
sleep_mode:
name: Sleep mode
initial: off
icon: mdi:sleep
automation:
- alias: Sleep mode · Enable
trigger:
platform: state
entity_id: input_boolean.sleep_mode
from: "off"
to: "on"
action:
- service: script.routine_good_night
- alias: Sleep mode · Disable
trigger:
platform: state
entity_id: input_boolean.sleep_mode
from: "on"
to: "off"
action:
- service: script.routine_waking_up
- alias: Sleep mode · Toggle on bedside switch double click
trigger:
- platform: event
event_type: zha_event
event_data:
device_ieee: !secret master_bedroom_bedside_switch_ieee
command: double
action:
- service_template: >-
{% if now().strftime('%H')|int > 20 or now().strftime('%H')|int < 6 %}
input_boolean.turn_on
{% else %}
input_boolean.turn_off
{% endif %}
entity_id: input_boolean.sleep_mode
+312
View File
@@ -0,0 +1,312 @@
# https://www.home-assistant.io/integrations/light
# https://www.home-assistant.io/integrations/light.group/
light:
- platform: mqtt
name: "PC"
availability_topic: "tele/pc_light/LWT"
command_topic: "cmnd/pc_light/POWER"
state_topic: "tele/pc_light/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/pc_light/Dimmer"
brightness_state_topic: "tele/pc_light/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
hs_command_topic: "cmnd/pc_light/HSBColor"
hs_state_topic: "tele/pc_light/STATE"
hs_value_template: "{{ value_json.HSBColor.split(',')[0:2]|join(',') }}"
color_temp_command_topic: "cmnd/pc_light/CT"
color_temp_state_topic: "tele/pc_light/STATE"
color_temp_value_template: "{{ value_json.CT }}"
rgb_command_topic: "cmnd/pc_light/Color"
rgb_state_topic: "tele/pc_light/STATE"
rgb_value_template: "{{ value_json.Color.split(',')[0:3]|join(',') }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "Living room 1"
availability_topic: "tele/living_room_1/LWT"
command_topic: "cmnd/living_room_1/POWER"
state_topic: "tele/living_room_1/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/living_room_1/Dimmer"
brightness_state_topic: "tele/living_room_1/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
color_temp_command_topic: "cmnd/living_room_1/CT"
color_temp_state_topic: "tele/living_room_1/STATE"
color_temp_value_template: "{{ value_json.CT }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "Living room 2"
availability_topic: "tele/living_room_2/LWT"
command_topic: "cmnd/living_room_2/POWER"
state_topic: "tele/living_room_2/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/living_room_2/Dimmer"
brightness_state_topic: "tele/living_room_2/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
color_temp_command_topic: "cmnd/living_room_2/CT"
color_temp_state_topic: "tele/living_room_2/STATE"
color_temp_value_template: "{{ value_json.CT }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "Living room 3"
availability_topic: "tele/living_room_3/LWT"
command_topic: "cmnd/living_room_3/POWER"
state_topic: "tele/living_room_3/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/living_room_3/Dimmer"
brightness_state_topic: "tele/living_room_3/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
color_temp_command_topic: "cmnd/living_room_3/CT"
color_temp_state_topic: "tele/living_room_3/STATE"
color_temp_value_template: "{{ value_json.CT }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- platform: mqtt
name: "Living room 4"
availability_topic: "tele/living_room_4/LWT"
command_topic: "cmnd/living_room_4/POWER"
state_topic: "tele/living_room_4/STATE"
state_value_template: "{{ value_json.POWER }}"
brightness_command_topic: "cmnd/living_room_4/Dimmer"
brightness_state_topic: "tele/living_room_4/STATE"
brightness_scale: 100
on_command_type: "brightness"
brightness_value_template: "{{ value_json.Dimmer }}"
color_temp_command_topic: "cmnd/living_room_4/CT"
color_temp_state_topic: "tele/living_room_4/STATE"
color_temp_value_template: "{{ value_json.CT }}"
payload_on: "ON"
payload_off: "OFF"
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
retain: false
- 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_main_lights
- light.pc
- platform: group
name: All lights
entities:
- light.living_room_all_lights
- light.bedside_light
sensor:
- platform: mqtt
name: "PC light WiFi"
availability_topic: "tele/pc_light/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/pc_light/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}"
- platform: mqtt
name: "Living room 1 light WiFi"
availability_topic: "tele/living_room_1/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/living_room_1/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}"
- platform: mqtt
name: "Living room 2 light WiFi"
availability_topic: "tele/living_room_2/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/living_room_2/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}"
- platform: mqtt
name: "Living room 3 light WiFi"
availability_topic: "tele/living_room_3/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/living_room_3/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}"
- platform: mqtt
name: "Living room 4 light WiFi"
availability_topic: "tele/living_room_4/LWT"
device_class: signal_strength
payload_available: "Online"
payload_not_available: "Offline"
state_topic: "tele/living_room_4/STATE"
unit_of_measurement: "%"
value_template: "{{ value_json['Wifi'].RSSI }}"
switch:
- platform: mqtt
name: "PC Light Fade"
availability_topic: "tele/pc_light/LWT"
command_topic: "cmnd/pc_light/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/pc_light/RESULT"
value_template: "{{ value_json.Fade }}"
- platform: mqtt
name: "Living room 1 light Fade"
availability_topic: "tele/living_room_1/LWT"
command_topic: "cmnd/living_room_1/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/living_room_1/RESULT"
value_template: "{{ value_json.Fade }}"
- platform: mqtt
name: "Living room 2 light Fade"
availability_topic: "tele/living_room_2/LWT"
command_topic: "cmnd/living_room_2/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/living_room_2/RESULT"
value_template: "{{ value_json.Fade }}"
- platform: mqtt
name: "Living room 3 light Fade"
availability_topic: "tele/living_room_3/LWT"
command_topic: "cmnd/living_room_3/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/living_room_3/RESULT"
value_template: "{{ value_json.Fade }}"
- platform: mqtt
name: "Living room 4 light Fade"
availability_topic: "tele/living_room_4/LWT"
command_topic: "cmnd/living_room_4/FADE"
icon: mdi:gradient
payload_available: "Online"
payload_not_available: "Offline"
qos: 1
state_topic: "stat/living_room_4/RESULT"
value_template: "{{ value_json.Fade }}"
automation:
- alias: Lighting · Turn on all lights after sunset
trigger:
platform: sun
event: sunset
offset: "+00:00:00"
condition:
- condition: state
entity_id: binary_sensor.georgi_home
state: "on"
action:
- service: light.turn_on
entity_id: light.all_lights
- alias: Lighting · Turn off all lights after sunrise
trigger:
platform: sun
event: sunrise
offset: "+00:00:00"
action:
- service: light.turn_off
entity_id: light.all_lights
- alias: Lighting · Master bedroom · Toggle bedside light on bedisde switch single click"
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret master_bedroom_bedside_switch_ieee
command: single
action:
- service: light.toggle
entity_id: light.bedside_light
- alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: flip
args:
flip_degrees: 90
action:
- service: light.turn_on
entity_id: light.living_room_all_lights
- alias: Lighting · Living room · Turn all lights off on Magic Cube flip 180
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: flip
args:
flip_degrees: 180
action:
- service: light.turn_off
entity_id: light.living_room_all_lights
- alias: Lighting · Sync Tasmota states on start-up
initial_state: true
trigger:
platform: homeassistant
event: start
action:
- service: mqtt.publish
data:
topic: "cmnd/tasmotas/STATE"
payload: ""
+92
View File
@@ -0,0 +1,92 @@
group:
all_sonos:
name: All Sonos
entities:
- media_player.master_bedroom
- media_player.living_room
- media_player.kitchen
- media_player.bathroom
input_select:
sonos_leader:
name: Sonos Leader
initial: media_player.master_bedroom
icon: mdi:speaker
options:
- media_player.master_bedroom
- media_player.living_room
- media_player.kitchen
binary_sensor:
- platform: template
sensors:
sonos_leader_paused:
value_template: "{{ is_state(states.input_select.sonos_leader.state, 'paused') }}"
entity_id:
- input_select.sonos_leader
- media_player.master_bedroom
- media_player.kitchen
- media_player.living_room
script:
music_play:
alias: Music · Play
sequence:
- service: script.music_join_sonoses
- service: media_player.volume_set
entity_id: group.all_sonos
data_template:
volume_level: "{{ volume | default(0.3) }}"
- service: media_player.shuffle_set
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
shuffle: "{{ shuffle | default(true) }}"
- service: media_player.select_source
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
source: "{{ playlist | default('Evening Chill') }}"
music_join_sonoses:
alias: Music · Join Sonoses
sequence:
- service: sonos.join
entity_id: group.all_sonos
data_template:
master: "{{ states('input_select.sonos_leader') }}"
automation:
- alias: Music · Play/Pause on Magic Cube Knock
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: knock
action:
- service: media_player.media_play_pause
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
- alias: Music · Volume down on Magic Cube rotate left
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: rotate_left
action:
- service: media_player.volume_down
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
- alias: Music · Volume up on Magic Cube rotate right
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: rotate_right
action:
- service: media_player.volume_up
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
+131
View File
@@ -0,0 +1,131 @@
#
# ─── 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
#
# ─── 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
- 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: notify.telegram
data:
title: "🏠 *Presence Module · Arrival detection*"
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: notify.telegram
data:
title: "🏠 *Presence Module · Arrival detection*"
message: "✅ Hey, I've marked you as home now!"
- alias: Presence · Leaving home
trigger:
platform: state
entity_id: person.georgi
from: "home"
to: "not_home"
action:
- service: script.routine_leaving_home
- service: notify.telegram
data:
title: "🏠 *Presence Module · Leaving Home*"
message: "I see you're leaving. Goodbye!"
- alias: Presence · Coming home
trigger:
platform: state
entity_id: binary_sensor.georgi_home
to: "on"
action:
- service: script.routine_coming_home
- service: notify.telegram
data:
title: "🏠 *Presence Module · Coming Home*"
message: "Welcome home!"
- alias: Presence · Leaving work
trigger:
platform: state
entity_id: person.georgi
from: "work"
to: "not_home"
action:
- service: notify.telegram
data:
title: "🏠 *Presence Module · Leaving Work*"
message: "Hey, I see you're leaving work. Are you coming home?"
data:
inline_keyboard:
- "Yes:/leaving_work_to_home, No:/do_nothing"
#
# ─── 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.presence_coming_home:
icon: mdi:home-account
automation.presence_leaving_home:
icon: mdi:home
automation.presence_arrival_detecion:
icon: mdi:account-plus-outline
+115
View File
@@ -0,0 +1,115 @@
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
alarm_start:
sequence:
- service: media_player.play_media
data:
entity_id: media_player.master_bedroom
media_content_id: "https://raw.githubusercontent.com/saeedsohi/siren/master/FireTrucksSirens.mp3"
media_content_type: music
- service: light.turn_on
entity_id: light.bedside_light
data:
brightness_pct: 100
- service: light.turn_on
entity_id: light.bedside_light
data:
effect: Police
alarm_stop:
sequence:
- service: media_player.media_stop
entity_id: media_player.master_bedroom
- service: light.turn_on
entity_id: light.bedside_light
data:
brightness_pct: 60
kelvin: 2400
# 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:
- delay: 00:00:10
- service: switch.turn_off
entity_id: switch.camera
- id: security_door_opened_while_away
alias: Security · Door opened while away
trigger:
- platform: state
entity_id: binary_sensor.front_door_on_off
to: "on"
condition:
condition: and
conditions:
- condition: state
entity_id: person.georgi
state: "not_home"
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
action:
- service: notify.telegram
data:
title: "🛡 *Security Module · Door opened while away*"
message: "It seems like the front door was opened while you are away! Check the camera!"
+103
View File
@@ -0,0 +1,103 @@
input_boolean:
speech_notifications:
name: Speech notifications
icon: mdi:chat
sarah_talking:
name: SARAH talking
icon: mdi:chat
initial: off
script:
say:
alias: Speech · Say
sequence:
# Don't talk while in sleep mode.
- condition: state
entity_id: input_boolean.sleep_mode
state: "off"
# Combine partials for speech message.
- service: script.say_discretely
data_template:
message: >-
{%- if partials is defined -%}
{%- for partial in partials -%}
{{ partial }}{{ " " }}
{%- endfor -%}
{%- else -%}
{{ message }}
{%- endif -%}
say_discretely:
alias: Speech · Say discretely
sequence:
# Figure out whether to talk or send a text.
- service_template: >
{% if is_state(states('input_select.sonos_leader'), 'playing')
or is_state('input_boolean.speech_notifications', 'off')
or is_state('input_boolean.georgi_home', 'off') %}
notify.telegram
{% else %}
script.sonos_blast
{% endif %}
data_template:
title: "💬 *Speech Module*" # For telegram only
message: "{{ message }}"
sonos_blast:
alias: Speech · Sonos blast
sequence:
# Mark SARAH as talking.
- service: input_boolean.turn_on
entity_id: input_boolean.sarah_talking
# Don't shout :)
- service: media_player.volume_set
entity_id: group.all_sonos
data_template:
volume_level: >-
{% if now().strftime('%H')|int < 6 and now().strftime('%H')|int > 0 %}
0.2
{% else %}
0.4
{% endif %}
# Say message.
- service: tts.amazon_polly_say
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
message: "{{ message }}"
# Wait for phrase to be over and mark as not talking.
- delay: 00:00:01
- wait_template: "{{ is_state('binary_sensor.sonos_leader_paused', 'on') }}"
timeout: 00:02:00
- service: input_boolean.turn_off
entity_id: input_boolean.sarah_talking
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
automation:
- alias: Speech · Telegram · Action · Do nothing
trigger:
platform: event
event_type: telegram_callback
event_data:
command: "/do_nothing"
action:
- service: telegram_bot.delete_message
data_template:
message_id: "{{ trigger.event.data.message.message_id}}"
chat_id: "{{ trigger.event.data.chat_id }}"
+53
View File
@@ -0,0 +1,53 @@
sensor:
- platform: template
sensors:
sarah_url:
friendly_name: "SARAH's URL"
value_template: !secret sarah_url
script:
sarah_restart:
alias: System · Restart SARAH
sequence:
service: homeassistant.restart
automation:
- alias: System · Announce start
trigger:
platform: homeassistant
event: start
action:
- delay: 00:00:06
- service: script.say
data:
message: "Hey! I was out for a bit, but I'm back online!"
- service: notify.telegram
data:
title: "⚙️ *System Module*"
message: "Ask me to do something anytime!"
data:
keyboard:
- "/guest_mode_on, /guest_mode_off"
- "/status"
- alias: System · Telegram · Announce status
trigger:
platform: event
event_type: telegram_command
event_data:
command: "/status"
action:
- service: notify.telegram
data_template:
title: "⚙️ *System Module*"
message: >-
Guest mode: {{ states('input_boolean.guest_mode') }}
Windows:
Living room: {{ states('binary_sensor.living_room_right_window_on_off') }}
Master bedroom: {{ states('binary_sensor.master_bedroom_right_window_on_off') }}
Lights:
Living room: {{ states('light.living_room_all_lights') }}
Master bedroom: {{ states('light.bedside_light') }}
+86
View File
@@ -0,0 +1,86 @@
sensor:
- platform: youtube
channel_id: UClFSU9_bUb4Rc6OYfTt5SPw
- platform: command_line
name: Available PDS
command: ls -1 /config/www/audio/youtube/pds | grep mp3 | paste -sd "," -
scan_interval: 30
- platform: command_line
name: Available Youtube clips
command: ls -1 /config/www/audio/youtube | grep mp3 | paste -sd "," -
scan_interval: 30
input_text:
youtube_download_url:
name: Youtube download URL
icon: mdi:link
initial: ""
youtube_download_name:
name: Youtube download name
icon: mdi:format-letter-case
initial: ""
shell_command:
youtube_download: python3.7 /config/custom_scripts/youtube_download.py {{ url }} {{ name }} {{ folder }}
script:
youtube_play_latest_pds:
alias: Youtube · Play latest PDS
sequence:
- service: script.music_join_sonoses
- service: media_player.play_media
data_template:
entity_id: media_player.master_bedroom
media_content_id: "{{ states('sensor.sarah_url') }}/local/audio/youtube/pds/{{ states('sensor.available_pds').split(',') | last }}"
media_content_type: "music"
youtube_download_selected:
alias: Youtube · Download selected video
sequence:
- service: shell_command.youtube_download
data_template:
url: "{{ states('input_text.youtube_download_url') }}"
name: "{{ states('input_text.youtube_download_name') }}"
- service: input_text.set_value
entity_id:
- input_text.youtube_download_url
- input_text.youtube_download_name
data:
value: ""
youtube_download_and_play:
alias: Youtube · Download and play selected video
sequence:
- service: shell_command.youtube_download
data_template:
url: "{{ states('input_text.youtube_download_url') }}"
name: "{{ states('input_text.youtube_download_name') }}"
- service: script.music_join_sonoses
- service: media_player.play_media
data_template:
entity_id: media_player.master_bedroom
media_content_id: "{{ states('sensor.sarah_url') }}/local/audio/youtube/{{ states('input_text.youtube_download_name') }}.mp3"
media_content_type: "music"
- service: input_text.set_value
entity_id:
- input_text.youtube_download_url
- input_text.youtube_download_name
data:
value: ""
automation:
- alias: Youtube · Download latest PDS
trigger:
platform: state
entity_id: sensor.philip_defranco
action:
- service: shell_command.youtube_download
data_template:
url: "{{ state_attr('sensor.philip_defranco', 'url') }}"
name: "{{ state_attr('sensor.philip_defranco', 'published')[0:10] }}"
folder: "pds/"
- service: script.say
data:
message: "Just wanted to let you know - a new PDS is available!"
+42
View File
@@ -0,0 +1,42 @@
script:
routine_bedtime:
alias: Routine · Bedtime
sequence:
# Set master bedroom state
- service: light.turn_on
entity_id: light.bedside_light
- service: fan.turn_on
entity_id: fan.philips_airpurifier
- service: sonos.unjoin
entity_id:
- media_player.living_room
- media_player.kitchen
- media_player.bathroom
- service: media_player.volume_set
entity_id: media_player.master_bedroom
data:
volume_level: 0.15
# Turn off everything else
- service: media_player.media_stop
entity_id:
- media_player.living_room
- media_player.kitchen
- media_player.bathroom
- service: media_player.turn_off
entity_id:
- media_player.nvidia_shield
- media_player.living_room_tv
- service: light.turn_off
entity_id: light.living_room_all_lights
automation:
- alias: Routine · Bedtime · Toggle on bedside switch hold
trigger:
- platform: event
event_type: zha_event
event_data:
device_ieee: !secret master_bedroom_bedside_switch_ieee
command: hold
action:
- service: script.routine_bedtime
+77
View File
@@ -0,0 +1,77 @@
input_boolean:
routine_welcome_home:
name: Coming home · Say welcome
initial: on
icon: mdi:account-plus-outline
script:
routine_coming_home:
alias: Routine · Coming home
sequence:
# Enter home mode.
- service: script.security_camera_off
- service: light.turn_on
entity_id: light.living_room_all_lights
- service: script.music_join_sonoses
# Check if welcome home is enabled, proceed with welcome routine.
- condition: state
entity_id: input_boolean.routine_welcome_home
state: "on"
- service: script.coming_home_welcome_home
coming_home_welcome_home:
alias: Routine · Coming home · Welcome home
sequence:
- service: script.say
data_template:
partials:
- !include ../../templates/partials/greeting.yaml
- !include ../../templates/partials/time.yaml
# - "Here's the current status:" // TODO: figure out if there will be anything to say?
- !include ../../templates/partials/window_suggestions.yaml
- wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}"
timeout: 00:02:00
- delay: 00:00:01
- service: script.say
data_template:
message: >-
{{
[
"I'll put some music on.",
"I'll play some music.",
"Here's some music."
] | random
}}
- delay: 00:00:02
- service: script.music_play
automation:
- alias: Routine · Coming home · Left work
trigger:
platform: event
event_type: telegram_callback
event_data:
command: "/leaving_work_to_home"
action:
- service: telegram_bot.edit_replymarkup
data_template:
message_id: "last"
chat_id: "{{ trigger.event.data.chat_id }}"
inline_keyboard:
- service: notify.telegram
data_template:
title: "🏠 *Presence Module · Leaving Work*"
message: >-
{{
[
"Okay, I'll be expecting you!",
"Awesome! I'm prepping for your arrival",
"Cool, I'll be ready!"
] | random
}}
+22
View File
@@ -0,0 +1,22 @@
script:
routine_good_night:
alias: Routine · Going to sleep
sequence:
- service: fan.turn_on
entity_id: fan.philips_airpurifier
- service: media_player.media_stop
entity_id: group.all_sonos
- service: light.turn_off
entity_id: light.all_lights
- service: media_player.turn_off
entity_id:
- media_player.nvidia_shield
- media_player.living_room_tv
# Use say_discretely instead of talk, because sleep_mode is already on.
- service: script.say_discretely
data:
message: "Entering sleep mode. Good night!"
# Prepare for the next day.
- delay: 00:00:05
- service: script.music_join_sonoses
@@ -0,0 +1,16 @@
script:
routine_leaving_home:
alias: Routine · Leaving home
sequence:
- 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.nvidia_shield
- media_player.living_room_tv
- service: media_player.media_stop
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
- service: light.turn_off
entity_id: light.all_lights
+46
View File
@@ -0,0 +1,46 @@
script:
routine_waking_up:
alias: Routine · Waking up
sequence:
- service: fan.turn_off
entity_id: fan.philips_airpurifier
- service: script.routine_morning_briefing
- wait_template: "{{ is_state('input_boolean.sarah_talking', 'off') }}"
timeout: 00:02:00
- delay: 00:00:01
- condition: state
entity_id: input_boolean.guest_mode
state: "off"
- service: script.say
data:
message: "Here's some music to start the day!"
- delay: 00:00:02
- service: script.music_play
routine_morning_briefing:
alias: Routine · Morning Briefing
sequence:
- service: script.say
data_template:
partials:
- !include ../../templates/partials/greeting.yaml
- !include ../../templates/partials/time.yaml
- >-
{{
[
"Here's your briefing for today!",
"Here's what's up!",
"Here are the updates today!"
] | random
}}
- !include ../../templates/partials/master_bedroom_climate.yaml
- !include ../../templates/partials/outside_forecast.yaml
- !include ../../templates/partials/light_check.yaml
- !include ../../templates/partials/window_check.yaml
- !include ../../templates/partials/iss.yaml
- !include ../../templates/partials/moon.yaml
- !include ../../templates/partials/inspirational_quote.yaml
+3
View File
@@ -0,0 +1,3 @@
sensor:
- platform: aftership
api_key: !secret aftership_key
+24
View File
@@ -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
+36
View File
@@ -0,0 +1,36 @@
# https://www.home-assistant.io/integrations/synologydsm
sensor:
- platform: synologydsm
host: !secret synology_ip
username: !secret synology_user
password: !secret synology_password
monitored_conditions:
- cpu_15min_load
- cpu_1min_load
- cpu_5min_load
- cpu_other_load
- cpu_system_load
- cpu_total_load
- cpu_user_load
- disk_below_remain_life_thr
- disk_device
- disk_exceed_bad_sector_thr
- disk_smart_status
- disk_status
- disk_temp
- memory_available_real
- memory_available_swap
- memory_cached
- memory_real_usage
- memory_size
- memory_total_real
- memory_total_swap
- network_down
- network_up
- volume_device_type
- volume_disk_temp_avg
- volume_disk_temp_max
- volume_percentage_used
- volume_size_total
- volume_size_used
- volume_status
+10
View File
@@ -0,0 +1,10 @@
# https://www.home-assistant.io/integrations/sun
sun:
sensor:
- platform: launch_library
- platform: moon
binary_sensor:
# https://www.home-assistant.io/integrations/iss/
- platform: iss
+12
View File
@@ -0,0 +1,12 @@
sensor:
- platform: waze_travel_time
name: Home to work
origin: zone.home
destination: zone.work
region: "EU"
- platform: waze_travel_time
name: Work to home
origin: zone.work
destination: zone.home
region: "EU"
+66
View File
@@ -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
+47
View File
@@ -0,0 +1,47 @@
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
group:
all_windows:
name: All windows
entities:
- binary_sensor.living_room_right_window_on_off
- binary_sensor.bedroom_right_window_on_off
+9
View File
@@ -0,0 +1,9 @@
>-
{%- if now().strftime('%H')|int < 12 and now().strftime('%H')|int > 6 -%}
Good morning!
{%- elif now().strftime('%H')|int >= 12 and now().strftime('%H')|int < 17 -%}
Good afternoon!
{%- else -%}
Good evening!
{%- endif -%}
@@ -0,0 +1,3 @@
>-
It's {{ states('sensor.bedroom_weather_temperature') | round }} degrees inside.
@@ -0,0 +1,55 @@
>-
{{
[
"And one more thing, Life is about making an impact, make it a positive one.",
"And one more thing, Whatever the mind of man can conceive and believe, it can achieve.",
"And one more thing, Strive not to be a success, but rather to be of value.",
"And one more thing, I attribute my overall success to never giving or taking an excuse.",
"And one more thing, You miss one hundred percent of the shots you dont take.",
"And one more thing, The most difficult thing is the decision to act, the rest is merely tenacity.",
"And one more thing, Every strike brings me closer to the next home run.",
"And one more thing, Defining thepurpose is the starting point of all achievement.",
"And one more thing, Life is not about getting and having, it's about giving and being.",
"And one more thing, We become what we think about.",
"And one more thing, Life is ten percent what happens to you and ninety percent of how you react to it.",
"And one more thing, The most common way people give up their power is by thinking they do not have any.",
"And one more thing, The mind is everything. What you think, you will become. ",
"And one more thing, The best time to plant a tree was twenty years ago. The second best time is now.",
"And one more thing, An unexamined life is not worth living.",
"And one more thing, Eighty percent of success is showing up.",
"And one more thing, Your time is limited, so do not waste it living someone elses life.",
"And one more thing, Winning is not everything, but wanting to win is.",
"And one more thing, I am not a product of my circumstances. I am a product of my decisions.",
"And one more thing, You can never cross the ocean until you have the courage to lose sight of the shore.",
"And one more thing, Either you run the day, or the day runs you.",
"And one more thing, Whether you think you can or you think you cannot, you will be right.",
"And one more thing, The two most important days in your life are the day you are born and the day you find out why.",
"And one more thing, Whatever you can do, or dream you can, begin it. Boldness has genius, power, and magic in it.",
"And one more thing, The best revenge is massive success.",
"And one more thing, The universe cant put good into your hands unless you let go of the bad.",
"And one more thing, People often say that motivation does not last. Well, neither does bathing. That is why we recommend it daily.",
"And one more thing, Life shrinks or expands in proportion to ones courage.",
"And one more thing, If you hear a voice within you say you cannot paint, then by all means paint and that voice will be silenced.",
"And one more thing, There is only one way to avoid criticism: do nothing, say nothing, and be nothing.",
"And one more thing, Ask and it will be given to you; search, and you will find; knock and the door will be opened for you.",
"And one more thing, The only person you are destined to become is the person you decide to be.",
"And one more thing, Go confidently in the direction of your dreams. Live the life you have imagined.",
"And one more thing, Certain things catch your eye, but pursue only those that capture the heart.",
"And one more thing, Believe you can and you are halfway there.",
"And one more thing, Everything you have ever wanted is on the other side of fear.",
"And one more thing, Start where you are. Use what you have. Do what you can.",
"And one more thing, Fall seven times and stand up eight.",
"And one more thing, Everything has beauty, but not everyone can see.",
"And one more thing, Life is not measured by the number of breaths we take, but by the moments that take our breath away.",
"And one more thing, Happiness is not something readymade. It comes from your own actions.",
"And one more thing, If you are offered a seat on a rocket ship, do not ask what seat! Just get on.",
"And one more thing, If the wind will not serve, take to the oars.",
"And one more thing, You can not fall if you do not climb. But theres no joy in living your whole life on the ground.",
"And one more thing, Too many of us are not living our dreams because we are living our fears.",
"And one more thing, Challenges are what make life interesting and overcoming them is what makes life meaningful.",
"And one more thing, If you want to lift yourself up, lift up someone else.",
"And one more thing, Be nice to others and nice things will happen to you.",
"And one more thing, It is nice to be important, but more important to be nice."
] | random
}}
+5
View File
@@ -0,0 +1,5 @@
>-
{%- if is_state('binary_sensor.iss', 'on') -%}
Here is something interesting. The international space station is above us now. There are {{ states.binary_sensor.iss.attributes['number_of_people_in_space'] }} people in space right now.
{%- endif -%}
@@ -0,0 +1,11 @@
>-
{%- if is_state('light.all_lights', 'on') -%}
There are
{%- for state in states.light if state.state == 'on' -%}
{% if loop.last %} {{ loop.index }} {% endif %}
{%- endfor -%}
lights turned on right now.
{%- else -%}
There are no lights turned on right now.
{%- endif -%}
@@ -0,0 +1,3 @@
>-
In the bedroom, it is {{ states('sensor.bedroom_weather_temperature') | round }} degrees with around {{ states('sensor.bedroom_weather_humidity') | round }} percent humidity.
+12
View File
@@ -0,0 +1,12 @@
>-
{%- if states.sensor.moon.state == 'Full moon' -%}
{{
[
"Check out the full moon tonight!",
"Hey look, There is the full moon.",
"The moon is huge! And full.",
"If you want to see the full moon, tonight is the night."
] | random
}}
{%- endif -%}
@@ -0,0 +1,3 @@
>-
Outside, it's {{ states('sensor.dark_sky_temperature') | round }} degrees. It's going to be {{ states('sensor.dark_sky_hourly_summary') }} Expect {{ states('sensor.dark_sky_daily_summary') }}
+3
View File
@@ -0,0 +1,3 @@
>-
The time is {{ now().hour }} {{ "%0.02d" | format(now().strftime("%-M") | int) }}.
@@ -0,0 +1,8 @@
>-
{%- if is_state('group.all_windows', 'on') -%}
{%- if is_state('binary_sensor.living_room_right_window_on_off', 'on') -%} The living room window is opened. {% endif %}
{%- if is_state('binary_sensor.bedroom_right_window_on_off', 'on') -%} The master bedroom window is opened. {%- endif -%}
{%- else -%}
All windows are closed.
{%- endif -%}
@@ -0,0 +1,29 @@
>-
{%- set getting_hot = [
" to cool down a bit.",
". It's getting hot!",
", or you're probably gonna boil!",
", or you're gonna simmer!"
] -%}
{%- set getting_cold = [
" to warm up a bit.",
". It's getting chilly!",
", or you're probably gonna freeze!",
", or you're gonna ice up!"
] -%}
{%- if (states('sensor.dark_sky_temperature') | int) < (states('sensor.bedroom_weather_temperature') | int) -%}
{%- if is_state('binary_sensor.bedroom_right_window_on_off', 'off')
and (states('sensor.bedroom_weather_temperature') | int) > 22 -%}
You should probably open the master bedroom window{{ getting_hot | random }}
{%- endif -%}
{%- if is_state('binary_sensor.bedroom_right_window_on_off', 'on')
and (states('sensor.bedroom_weather_temperature') | int) < 18 -%}
You should probably close the master bedroom window{{ getting_cold | random }}
{%- endif -%}
{%- endif -%}
+20
View File
@@ -0,0 +1,20 @@
custom_header:
compact_mode: true
editor_warnings: false
hide_config: true
hide_help: true
hide_unused: true
decluttering_templates: !include_dir_merge_named lovelace/templates
title: Sarah
views:
- !include lovelace/00_home.yaml
- !include lovelace/01_living_room.yaml
- !include lovelace/02_master_bedroom.yaml
- !include lovelace/03_kitchen.yaml
- !include lovelace/04_bathroom.yaml
- !include lovelace/05_media.yaml
- !include lovelace/06_system.yaml
- !include lovelace/07_covid_19.yaml
- !include lovelace/08_test.yaml