Rework: Dockerize. Upgrade to 107. Remove automation ids

This commit is contained in:
2020-03-20 00:08:28 +02:00
parent 1b6da83acb
commit 5963d08edd
16 changed files with 148 additions and 171 deletions

View File

@@ -20,6 +20,52 @@ http:
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:
@@ -105,6 +151,11 @@ plex:
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
@@ -127,12 +178,6 @@ tts:
voice: Amy
engine: neural
# https://www.home-assistant.io/integrations/tuya
tuya:
username: !secret tuya_username
password: !secret tuya_password
country_code: bg
# https://www.home-assistant.io/integrations/wake_on_lan
wake_on_lan:
@@ -159,6 +204,24 @@ yeelight:
# 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 ────────────────────────────────────────────────────────────────────
#

View File

@@ -8,7 +8,7 @@ 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"""~/.homeassistant/www/audio/youtube/{out_folder}{out_name}"""
full_file_path = f"""/config/www/audio/youtube/{out_folder}{out_name}"""
ydl = youtube_dl.YoutubeDL({'format': 'bestaudio', 'outtmpl': full_file_path})

View File

@@ -83,8 +83,8 @@ cards:
show_header_toggle: false
entities:
- sun.sun
- sensor.carbon_battery_level_2
- sensor.carbon_steps_2
- sensor.carbon_battery_level
- sensor.carbon_steps
- binary_sensor.updater
# Column 3: Misc

View File

@@ -18,9 +18,10 @@ cards:
entities:
- input_boolean.routine_welcome_home
- automation.presence_arrival_detection
- automation.coming_home
- automation.leaving_work_to_home
- automation.leaving_home
- automation.presence_coming_home
- automation.presence_leaving_home
- automation.routine_coming_home_left_work
- automation.presence_leaving_work
- type: custom:fold-entity-row
head:
@@ -30,12 +31,12 @@ cards:
icon: mdi:lightbulb
open: true
entities:
- automation.lighting_turn_on_after_sunset
- automation.lighting_turn_off_after_sunrise
- automation.lighting_master_bedroom_bedside_light_on_bedside_switch_single_click
- automation.lighting_living_room_turn_on_cube_flip_90
- automation.lighting_living_room_turn_off_cube_flip_180
- automation.lighting_sync_tasmota_state_on_startup
- 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:
@@ -45,9 +46,9 @@ cards:
icon: mdi:music-note
open: true
entities:
- automation.music_pause_on_cube_knock
- automation.music_volume_down_on_cube_rotate_left
- automation.music_volume_up_on_cube_rotate_right
- 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:
@@ -55,10 +56,10 @@ cards:
entity: input_boolean.sleep_mode
open: true
entities:
- automation.bedtime_toggle_on_master_bedroom_bedside_switch_hold
- automation.enable_sleep_mode
- automation.disable_sleep_mode
- automation.sleep_toggle_on_switch_tap
- 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:
@@ -66,10 +67,10 @@ cards:
entity: input_boolean.guest_mode
open: true
entities:
- automation.enable_guest_mode
- automation.disable_guest_mode
- automation.telegram_enable_guest_mode
- automation.telegram_disable_guest_mode
- 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:
@@ -102,8 +103,8 @@ cards:
open: true
entities:
- automation.system_announce_start
- automation.system_telegram_status
- automation.speech_telegram_do_nothing
- automation.system_telegram_announce_status
- automation.speech_telegram_action_do_nothing
- type: entities
title: Batteries

View File

@@ -6,24 +6,23 @@ input_boolean:
group:
domestina_disabled_automations:
- automation.presence_arrival_detection
- automation.coming_home
- automation.leaving_work_to_home
- automation.leaving_home
- automation.enable_sleep_mode
- automation.disable_sleep_mode
- automation.sleep_toggle_on_switch_tap
- automation.music_pause_on_cube_knock
- automation.music_volume_down_on_cube_rotate_left
- automation.music_volume_up_on_cube_rotate_right
- automation.lighting_turn_on_after_sunset
- automation.lighting_turn_off_after_sunrise
- automation.lighting_living_room_turn_on_cube_flip_90
- automation.lighting_living_room_turn_off_cube_flip_180
- automation.bedtime_toggle_on_master_bedroom_bedside_switch_hold
- 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:
- id: domestina_automate_start
alias: Domestina · Automate start
- alias: Domestina · Automate start
trigger:
platform: time
at: "08:30:00"
@@ -34,8 +33,7 @@ automation:
- service: input_boolean.turn_on
entity_id: input_boolean.domestina
- id: domestina_start
alias: Domestina · Start
- alias: Domestina · Start
trigger:
platform: state
entity_id: input_boolean.domestina
@@ -47,8 +45,7 @@ automation:
- service: automation.turn_off
entity_id: group.domestina_disabled_automations
- id: domestina_automate_end
alias: Domestina · Automate end
- alias: Domestina · Automate end
trigger:
platform: time
at: "13:00:00"
@@ -59,8 +56,7 @@ automation:
- service: input_boolean.turn_off
entity_id: input_boolean.domestina
- id: domestina_end
alias: Domestina · End
- alias: Domestina · End
trigger:
platform: state
entity_id: input_boolean.domestina

View File

@@ -5,8 +5,7 @@ input_boolean:
icon: mdi:human-greeting
automation:
- id: enable_guest_mode
alias: Guest mode · Enable
- alias: Guest mode · Enable
trigger:
platform: state
entity_id: input_boolean.guest_mode
@@ -15,13 +14,12 @@ automation:
action:
- service: automation.turn_off
entity_id:
- automation.leaving_home
- automation.coming_home
- automation.presence_leaving_home
- automation.presence_coming_home
- service: input_boolean.turn_off
entity_id: input_boolean.speech_notifications
- id: disable_guest_mode
alias: Guest mode · Disable
- alias: Guest mode · Disable
trigger:
platform: state
entity_id: input_boolean.guest_mode
@@ -30,13 +28,12 @@ automation:
action:
- service: automation.turn_on
entity_id:
- automation.leaving_home
- automation.coming_home
- automation.presence_leaving_home
- automation.presence_coming_home
- service: input_boolean.turn_on
entity_id: input_boolean.speech_notifications
- id: telegram_enable_guest_mode
alias: Guest mode · Enable · From Telegram
- alias: Guest mode · Enable · From Telegram
trigger:
platform: event
event_type: telegram_command
@@ -50,8 +47,7 @@ automation:
title: "⚙️ *System Module*"
message: "Okay, turning Guest mode on!"
- id: telegram_disable_guest_mode
alias: Guest mode · Disable · From Telegram
- alias: Guest mode · Disable · From Telegram
trigger:
platform: event
event_type: telegram_command

View File

@@ -5,8 +5,7 @@ input_boolean:
icon: mdi:sleep
automation:
- id: enable_sleep_mode
alias: Sleep mode · Enable
- alias: Sleep mode · Enable
trigger:
platform: state
entity_id: input_boolean.sleep_mode
@@ -15,8 +14,7 @@ automation:
action:
- service: script.routine_good_night
- id: disable_sleep_mode
alias: Sleep mode · Disable
- alias: Sleep mode · Disable
trigger:
platform: state
entity_id: input_boolean.sleep_mode
@@ -25,8 +23,7 @@ automation:
action:
- service: script.routine_waking_up
- id: sleep_toggle_on_switch_tap
alias: Sleep mode · Toggle on bedside switch double click
- alias: Sleep mode · Toggle on bedside switch double click
trigger:
- platform: event
event_type: zha_event

View File

@@ -241,8 +241,7 @@ switch:
value_template: "{{ value_json.Fade }}"
automation:
- id: lighting_turn_on_after_sunset
alias: Lighting · Turn on all lights after sunset
- alias: Lighting · Turn on all lights after sunset
trigger:
platform: sun
event: sunset
@@ -255,8 +254,7 @@ automation:
- service: light.turn_on
entity_id: light.all_lights
- id: lighting_turn_off_after_sunrise
alias: Lighting · Turn off all lights after sunrise
- alias: Lighting · Turn off all lights after sunrise
trigger:
platform: sun
event: sunrise
@@ -265,8 +263,7 @@ automation:
- service: light.turn_off
entity_id: light.all_lights
- id: lighting_master_bedroom_bedside_light_on_bedside_switch_single_click
alias: Lighting · Master bedroom · Toggle bedside light on bedisde switch single click"
- alias: Lighting · Master bedroom · Toggle bedside light on bedisde switch single click"
trigger:
platform: event
event_type: zha_event
@@ -277,8 +274,7 @@ automation:
- service: light.toggle
entity_id: light.bedside_light
- id: lighting_living_room_turn_on_cube_flip_90
alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
- alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
trigger:
platform: event
event_type: zha_event
@@ -291,8 +287,7 @@ automation:
- service: light.turn_on
entity_id: light.living_room_all_lights
- id: lighting_living_room_turn_off_cube_flip_180
alias: Lighting · Living room · Turn all lights off on Magic Cube flip 180
- alias: Lighting · Living room · Turn all lights off on Magic Cube flip 180
trigger:
platform: event
event_type: zha_event
@@ -305,8 +300,7 @@ automation:
- service: light.turn_off
entity_id: light.living_room_all_lights
- id: lighting_sync_tasmota_state_on_startup
alias: Lighting · Sync Tasmota states on start-up
- alias: Lighting · Sync Tasmota states on start-up
initial_state: true
trigger:
platform: homeassistant

View File

@@ -55,8 +55,7 @@ script:
master: "{{ states('input_select.sonos_leader') }}"
automation:
- id: music_pause_on_cube_knock
alias: Music · Play/Pause on Magic Cube Knock
- alias: Music · Play/Pause on Magic Cube Knock
trigger:
platform: event
event_type: zha_event
@@ -68,8 +67,7 @@ automation:
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
- id: music_volume_down_on_cube_rotate_left
alias: Music · Volume down on Magic Cube rotate left
- alias: Music · Volume down on Magic Cube rotate left
trigger:
platform: event
event_type: zha_event
@@ -81,8 +79,7 @@ automation:
data_template:
entity_id: "{{ states('input_select.sonos_leader') }}"
- id: music_volume_up_on_cube_rotate_right
alias: Music · Volume up on Magic Cube rotate right
- alias: Music · Volume up on Magic Cube rotate right
trigger:
platform: event
event_type: zha_event

View File

@@ -16,20 +16,6 @@ device_tracker:
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 ───────────────────────────────────────────────────────────────────
#
@@ -54,8 +40,7 @@ binary_sensor:
automation:
# When my state changes to "home", wait for 15 minutes for the door to be opened, and then mark me as home
- id: presence_arrival_detecion
alias: Presence · Arrival detection
- alias: Presence · Arrival detection
trigger:
platform: state
entity_id: person.georgi
@@ -79,8 +64,7 @@ automation:
title: "🏠 *Presence Module · Arrival detection*"
message: "✅ Hey, I've marked you as home now!"
- id: leaving_home
alias: Presence · Leaving home
- alias: Presence · Leaving home
trigger:
platform: state
entity_id: person.georgi
@@ -93,8 +77,7 @@ automation:
title: "🏠 *Presence Module · Leaving Home*"
message: "I see you're leaving. Goodbye!"
- id: coming_home
alias: Presence · Coming home
- alias: Presence · Coming home
trigger:
platform: state
entity_id: binary_sensor.georgi_home
@@ -106,8 +89,7 @@ automation:
title: "🏠 *Presence Module · Coming Home*"
message: "Welcome home!"
- id: leaving_work
alias: Presence · Leaving work
- alias: Presence · Leaving work
trigger:
platform: state
entity_id: person.georgi
@@ -139,10 +121,10 @@ homeassistant:
friendly_name: Keys Tile
icon: mdi:key-variant
automation.coming_home:
automation.presence_coming_home:
icon: mdi:home-account
automation.leaving_home:
automation.presence_leaving_home:
icon: mdi:home
automation.presence_arrival_detecion:

View File

@@ -90,8 +90,7 @@ script:
entity_id: media_player.master_bedroom
automation:
- id: speech_telegram_do_nothing
alias: Speech · Telegram · Action · Do nothing
- alias: Speech · Telegram · Action · Do nothing
trigger:
platform: event
event_type: telegram_callback

View File

@@ -12,8 +12,7 @@ script:
service: homeassistant.restart
automation:
- id: system_announce_start
alias: System · Announce start
- alias: System · Announce start
trigger:
platform: homeassistant
event: start
@@ -31,8 +30,7 @@ automation:
- "/guest_mode_on, /guest_mode_off"
- "/status"
- id: system_telegram_status
alias: System · Telegram · Announce status
- alias: System · Telegram · Announce status
trigger:
platform: event
event_type: telegram_command

View File

@@ -3,11 +3,11 @@ sensor:
channel_id: UClFSU9_bUb4Rc6OYfTt5SPw
- platform: command_line
name: Available PDS
command: !secret youtube_pds_list_command
command: ls -1 /config/www/audio/youtube/pds | grep mp3 | paste -sd "," -
scan_interval: 30
- platform: command_line
name: Available Youtube clips
command: !secret youtube_list_command
command: ls -1 /config/www/audio/youtube | grep mp3 | paste -sd "," -
scan_interval: 30
input_text:
@@ -21,7 +21,7 @@ input_text:
initial: ""
shell_command:
youtube_download: !secret youtube_download_command
youtube_download: python3.7 /config/custom_scripts/youtube_download.py {{ url }} {{ name }} {{ folder }}
script:
youtube_play_latest_pds:
@@ -71,8 +71,7 @@ script:
value: ""
automation:
- id: youtube_download_latest_pds
alias: Youtube · Download latest PDS
- alias: Youtube · Download latest PDS
trigger:
platform: state
entity_id: sensor.philip_defranco

View File

@@ -31,8 +31,7 @@ script:
entity_id: light.living_room_all_lights
automation:
- id: bedtime_toggle_on_master_bedroom_bedside_switch_hold
alias: Routine · Bedtime · Toggle on bedside switch hold
- alias: Routine · Bedtime · Toggle on bedside switch hold
trigger:
- platform: event
event_type: zha_event

View File

@@ -51,8 +51,7 @@ script:
- service: script.music_play
automation:
- id: leaving_work_to_home
alias: Routine · Coming home · Left work
- alias: Routine · Coming home · Left work
trigger:
platform: event
event_type: telegram_callback

View File

@@ -4,49 +4,6 @@ custom_header:
hide_config: true
hide_help: true
hide_unused: true
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: /community_plugin/spotify-card/spotify-card.js
- type: module
url: /community_plugin/circle-sensor-card/circle-sensor-card.js
- type: module
url: /hacsfiles/lovelace-card-mod/card-mod.js
- type: js
url: /community_plugin/light-entity-card/light-entity-card.js
- type: module
url: /community_plugin/weather-card/weather-card.js
- type: module
url: /community_plugin/custom-header/custom-header.js
- type: module
url: /community_plugin/mini-graph-card/mini-graph-card-bundle.js
- type: module
url: /community_plugin/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
decluttering_templates: !include_dir_merge_named lovelace/templates