movie mode, lr presence, bathroom controls, new automations

This commit is contained in:
Georgi Gardev
2023-11-11 15:35:15 +02:00
parent 500dff207a
commit 5303380611
20 changed files with 234 additions and 93 deletions
@@ -25,7 +25,7 @@ cards:
entities: entities:
- input_boolean.heating_enabled - input_boolean.heating_enabled
- input_number.radiators_temperature - input_number.radiators_temperature
- climate.living_room_radiator_mode - climate.living_room_valve
- climate.bedroom_radiator_mode - climate.bedroom_radiator_mode
- climate.kitchen_radiator_mode - climate.kitchen_radiator_mode
- script.turn_on_all_radiators - script.turn_on_all_radiators
@@ -100,6 +100,7 @@ cards:
- automation.tv_state_sync_shield_state - automation.tv_state_sync_shield_state
- automation.tv_prepare_for_casting - automation.tv_prepare_for_casting
- type: divider - type: divider
- automation.movie_mode_change
- automation.tv_plex_setup_house_for_plex - automation.tv_plex_setup_house_for_plex
- automation.tv_plex_restore_house_after_plex - automation.tv_plex_restore_house_after_plex
- automation.media_sonos_put_beam_in_night_mode - automation.media_sonos_put_beam_in_night_mode
@@ -71,7 +71,7 @@ cards:
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.hallway_motion_battery entity: sensor.hallway_motion_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.hallway_motion_2_battery entity: sensor.bathroom_motion_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
entity: sensor.guest_bedroom_weather_battery entity: sensor.guest_bedroom_weather_battery
- type: custom:battery-entity-row - type: custom:battery-entity-row
@@ -119,7 +119,7 @@ cards:
- sensor.front_door_linkquality - sensor.front_door_linkquality
- sensor.hallway_weather_linkquality - sensor.hallway_weather_linkquality
- sensor.hallway_motion_linkquality - sensor.hallway_motion_linkquality
- sensor.hallway_motion_2_linkquality - sensor.bathroom_motion_linkquality
- type: divider - type: divider
- sensor.guest_bedroom_weather_linkquality - sensor.guest_bedroom_weather_linkquality
@@ -60,7 +60,7 @@
- type: custom:decluttering-card - type: custom:decluttering-card
template: floorplan_state_with_icon template: floorplan_state_with_icon
variables: variables:
- entity: climate.living_room_radiator_mode - entity: climate.living_room_valve
- top: 86% - top: 86%
- left: 77.8% - left: 77.8%
- icon: mdi:radiator - icon: mdi:radiator
@@ -136,7 +136,7 @@ card:
service: script.toshiba_ac_toggle service: script.toshiba_ac_toggle
- type: custom:button-card - type: custom:button-card
template: [v3_button_radiator, v3_tablet_button] template: [v3_button_radiator, v3_tablet_button]
entity: climate.living_room_radiator_mode entity: climate.living_room_valve
name: "Living room" name: "Living room"
- type: custom:button-card - type: custom:button-card
template: [v3_button_radiator, v3_tablet_button] template: [v3_button_radiator, v3_tablet_button]
@@ -21,6 +21,11 @@
- type: custom:button-card - type: custom:button-card
template: v3_chip template: v3_chip
entity: sensor.bathroom_weather_humidity entity: sensor.bathroom_weather_humidity
- type: custom:button-card
template: v3_chip_name
entity: binary_sensor.bathroom_motion_occupancy
name: Motion
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -47,13 +47,27 @@
template: v3_horizontal_stack_card template: v3_horizontal_stack_card
variables: variables:
- cards: - cards:
- type: custom:button-card
template: v3_scene
entity: scene.bedroom_default
name: Default
variables:
scene_color_1: rgb(255, 0, 190)
scene_color_2: rgb(254, 255, 209)
- type: custom:button-card
template: v3_scene
entity: scene.bedroom_pink
name: Pink
variables:
scene_color_1: rgb(255, 0, 190)
scene_color_2: rgb(255, 0, 190)
- type: custom:button-card - type: custom:button-card
template: v3_scene template: v3_scene
entity: scene.bedroom_neon entity: scene.bedroom_neon
name: Neon name: Neon
variables: variables:
scene_color_1: rgb(255, 0, 190) scene_color_1: rgb(0, 255, 190)
scene_color_2: rgb(0, 255, 190) scene_color_2: rgb(255, 0, 190)
- type: custom:button-card - type: custom:button-card
template: v3_scene template: v3_scene
entity: scene.bedroom_ambient_neon entity: scene.bedroom_ambient_neon
@@ -61,25 +75,12 @@
variables: variables:
scene_color_1: rgb(255, 0, 190) scene_color_1: rgb(255, 0, 190)
scene_color_2: rgb(0, 255, 190) scene_color_2: rgb(0, 255, 190)
- type: custom:button-card
template: v3_scene
entity: scene.bedroom_default
name: Regular
variables:
scene_color_1: rgb(254, 255, 209)
- type: custom:button-card - type: custom:button-card
template: v3_scene template: v3_scene
entity: scene.bedroom_ambient_default entity: scene.bedroom_ambient_default
name: Ambient regular name: Ambient regular
variables: variables:
scene_color_1: rgb(254, 255, 209) scene_color_1: rgb(254, 255, 209)
- type: custom:button-card
template: v3_scene
entity: scene.bedroom_pink
name: Pink
variables:
scene_color_1: rgb(255, 92, 38)
scene_color_2: rgb(255, 0, 190)
- type: custom:button-card - type: custom:button-card
template: v3_scene template: v3_scene
entity: scene.bedroom_ambient_pink entity: scene.bedroom_ambient_pink
@@ -30,10 +30,7 @@
template: v3_chip_name template: v3_chip_name
entity: binary_sensor.hallway_motion_occupancy entity: binary_sensor.hallway_motion_occupancy
name: Motion name: Motion
- type: custom:button-card
template: v3_chip_name
entity: binary_sensor.hallway_motion_2_occupancy
name: Motion 2
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -28,6 +28,16 @@
template: v3_chip_name template: v3_chip_name
entity: binary_sensor.living_room_right_window_contact entity: binary_sensor.living_room_right_window_contact
name: Window name: Window
- type: horizontal-stack
cards:
- type: custom:button-card
template: v3_chip_name
entity: binary_sensor.living_room_presence
name: Presence
- type: custom:button-card
template: v3_chip_name
entity: binary_sensor.multisensor_6_home_security_motion_detection
name: Motion
- type: horizontal-stack - type: horizontal-stack
cards: cards:
- type: custom:button-card - type: custom:button-card
@@ -146,7 +156,7 @@
service: script.toggle_living_room_cover service: script.toggle_living_room_cover
- type: custom:button-card - type: custom:button-card
template: v3_button_radiator template: v3_button_radiator
entity: climate.living_room_radiator_mode entity: climate.living_room_valve
name: Radiator name: Radiator
- type: custom:button-card - type: custom:button-card
template: v3_button_ac template: v3_button_ac
@@ -76,6 +76,11 @@
entity: binary_sensor.pi_hole_enabled entity: binary_sensor.pi_hole_enabled
name: Pi-Hole name: Pi-Hole
icon: mdi:pi-hole icon: mdi:pi-hole
- type: custom:button-card
template: v3_button
entity: input_boolean.movie_mode
name: Movie Mode
icon: mdi:movie
- type: custom:decluttering-card - type: custom:decluttering-card
template: v3_section_title template: v3_section_title
@@ -115,9 +120,13 @@
template: v3_button template: v3_button
entity: light.browser_kitchen entity: light.browser_kitchen
name: Kitchen Dashboard name: Kitchen Dashboard
- type: entities
title: "Plex"
entities:
- input_text.plex_default_show
- script.start_default_show
- type: entities - type: entities
entities: entities:
- type: divider
- input_text.wake_up_spotify_playlist - input_text.wake_up_spotify_playlist
- input_number.wake_up_volume - input_number.wake_up_volume
- input_number.bathroom_high_volume - input_number.bathroom_high_volume
+2 -3
View File
@@ -39,7 +39,6 @@ cards:
- type: glance - type: glance
entities: entities:
- entity: binary_sensor.hallway_motion_occupancy - entity: binary_sensor.hallway_motion_occupancy
- entity: binary_sensor.hallway_motion_2_occupancy
- entity: sensor.hallway_motion_illuminance_lux - entity: sensor.hallway_motion_illuminance_lux
- entity: sensor.hallway_motion_battery - entity: sensor.hallway_motion_battery
@@ -253,8 +252,8 @@ cards:
- margin-left: 8px - margin-left: 8px
- type: custom:button-card - type: custom:button-card
template: [v3_tablet_button, v3_popup_button] template: [v3_tablet_button, v3_popup_button]
entity: binary_sensor.hallway_motion_2_occupancy entity: binary_sensor.bathroom_motion_occupancy
name: Hallway name: Bathroom
- type: custom:button-card - type: custom:button-card
template: [v3_tablet_button, v3_popup_button] template: [v3_tablet_button, v3_popup_button]
entity: binary_sensor.multisensor_motion entity: binary_sensor.multisensor_motion
+36
View File
@@ -0,0 +1,36 @@
input_boolean:
movie_mode:
name: Movie mode
icon: mdi:movie
automation:
- alias: Movie mode · Change
trigger:
platform: state
entity_id: input_boolean.movie_mode
action:
choose:
- conditions: "{{ trigger.to_state.state == 'on' }}"
sequence:
- service: automation.turn_off
entity_id:
- automation.lighting_hallway_motion_on
- automation.lighting_hallway_motion_off
- service: automation.turn_on
entity_id:
- automation.tv_plex_setup_house_for_plex
- automation.tv_plex_restore_house_after_plex
- service: script.plex_before_start
- conditions: "{{ trigger.to_state.state == 'off' }}"
sequence:
- service: scene.turn_on
entity_id: scene.plex_before_start
- service: automation.turn_off
entity_id:
- automation.tv_plex_setup_house_for_plex
- automation.tv_plex_restore_house_after_plex
- service: automation.turn_on
entity_id:
- automation.lighting_hallway_motion_on
- automation.lighting_hallway_motion_off
+1 -1
View File
@@ -26,10 +26,10 @@ automation:
- sensor.bathroom_weather_battery - sensor.bathroom_weather_battery
- sensor.bathroom_switch_battery - sensor.bathroom_switch_battery
- sensor.bathroom_motion_battery
- sensor.hallway_weather_battery - sensor.hallway_weather_battery
- sensor.hallway_motion_battery - sensor.hallway_motion_battery
- sensor.hallway_motion_2_battery
- sensor.guest_bedroom_weather_battery - sensor.guest_bedroom_weather_battery
- sensor.terrarium_weather_battery - sensor.terrarium_weather_battery
@@ -16,7 +16,7 @@ group:
all_radiators: all_radiators:
name: "All Radiators" name: "All Radiators"
entities: entities:
- climate.living_room_radiator_mode - climate.living_room_valve
- climate.bedroom_radiator_mode - climate.bedroom_radiator_mode
- climate.kitchen_radiator_mode - climate.kitchen_radiator_mode
@@ -66,12 +66,12 @@ script:
- service: climate.turn_on - service: climate.turn_on
entity_id: entity_id:
- climate.bedroom_radiator_mode - climate.bedroom_radiator_mode
- climate.living_room_radiator_mode - climate.living_room_valve
- climate.kitchen_radiator_mode - climate.kitchen_radiator_mode
- service: climate.set_temperature - service: climate.set_temperature
entity_id: entity_id:
- climate.bedroom_radiator_mode - climate.bedroom_radiator_mode
- climate.living_room_radiator_mode - climate.living_room_valve
- climate.kitchen_radiator_mode - climate.kitchen_radiator_mode
data_template: data_template:
temperature: "{{ states('input_number.radiators_temperature') | int | default(25) }}" temperature: "{{ states('input_number.radiators_temperature') | int | default(25) }}"
@@ -113,11 +113,11 @@ automation:
- condition: not - condition: not
conditions: conditions:
- condition: state - condition: state
entity_id: climate.living_room_radiator_mode entity_id: climate.living_room_valve
state: "off" state: "off"
sequence: sequence:
- service: climate.turn_off - service: climate.turn_off
entity_id: climate.living_room_radiator_mode entity_id: climate.living_room_valve
- service: logbook.log - service: logbook.log
data: data:
name: "💨 Climate module · " name: "💨 Climate module · "
@@ -128,12 +128,12 @@ automation:
entity_id: binary_sensor.living_room_right_window_contact entity_id: binary_sensor.living_room_right_window_contact
state: "off" state: "off"
- condition: state - condition: state
entity_id: climate.living_room_radiator_mode entity_id: climate.living_room_valve
state: "off" state: "off"
sequence: sequence:
- service: script.maybe_turn_radiator_on - service: script.maybe_turn_radiator_on
data: data:
entity_id: climate.living_room_radiator_mode entity_id: climate.living_room_valve
- service: logbook.log - service: logbook.log
data: data:
name: "💨 Climate module · " name: "💨 Climate module · "
@@ -1,34 +1,32 @@
script: script:
apply_bedroom_ambient_neon: bedroom_scene_default:
sequence: sequence:
- service: scene.turn_on - service: scene.turn_on
entity_id: scene.bedroom_ambient_neon entity_id: scene.bedroom_default
apply_bedroom_neon: - service: media_player.media_stop
entity_id: media_player.master_bedroom
bedroom_scene_1:
sequence: sequence:
- service: light.turn_on - service: scene.turn_on
entity_id: light.master_bedroom_main entity_id: scene.bedroom_pink
- delay: "00:00:01" bedroom_scene_1_music:
- service: light.turn_on sequence:
entity_id: light.master_bedroom_main - service: scene.turn_on
entity_id: scene.bedroom_pink
- service: media_player.shuffle_set
entity_id: media_player.master_bedroom
data: data:
rgb_color: [255, 0, 63] shuffle: true
brightness: 153 - service: media_player.volume_set
- delay: "00:00:02" entity_id: media_player.master_bedroom
- service: scene.turn_on data_template:
entity_id: scene.bedroom_ambient_neon volume_level: "{{ '0.3' if now().hour <= 23 else '0.15' }}"
apply_bedroom_pink: - service: media_player.play_media
sequence: entity_id: media_player.master_bedroom
- service: light.turn_on data_template:
entity_id: light.master_bedroom_main media_content_type: "music"
- delay: "00:00:01" media_content_id: "https://open.spotify.com/playlist/5b13IkygqCYveAlyrv34vB?si=3ac0c03fe65c4611"
- service: light.turn_on
entity_id: light.master_bedroom_main
data:
rgb_color: [255, 92, 38]
brightness: 120
- delay: "00:00:02"
- service: scene.turn_on
entity_id: scene.bedroom_ambient_pink
scene: scene:
- name: Bedroom Neon - name: Bedroom Neon
@@ -88,8 +86,8 @@ scene:
color_temp: 350 color_temp: 350
light.bedside: light.bedside:
state: "on" state: "on"
color_temp: 359 rgb_color: [255, 36, 145]
brightness: 255 brightness: 230
automation: automation:
- alias: Lighting · Bedroom · Door open - alias: Lighting · Bedroom · Door open
@@ -1,3 +1,52 @@
automation:
- alias: "Lightning · Living room · Motion on"
trigger:
- platform: state
entity_id: binary_sensor.multisensor_6_home_security_motion_detection
to: "on"
- platform: state
entity_id: binary_sensor.living_room_presence
to: "on"
condition:
- condition: state
entity_id: binary_sensor.someone_home
state: "on"
- condition: sun
after: sunset
after_offset: "-00:30:00"
- condition: state
entity_id: sensor.house_mode
state: 'day'
action:
- service: light.turn_on
entity_id:
# LR main
- light.light_le_1
- light.light_le_2
- light.light_le_3
- light.light_le_4
# PC
- light.hue_ambiance_7
- alias: "Lightning · Living room · Motion off"
trigger:
- platform: state
entity_id: binary_sensor.living_room_presence
to: "off"
for:
minutes: 5
action:
- service: light.turn_off
entity_id:
# LR main
- light.light_le_1
- light.light_le_2
- light.light_le_3
- light.light_le_4
# PC
- light.hue_ambiance_7
scene: scene:
- name: Living Room Ambient Neon - name: Living Room Ambient Neon
icon: "mdi:weather-night" icon: "mdi:weather-night"
@@ -88,21 +88,19 @@ light:
- platform: group - platform: group
name: On after dark name: On after dark
entities: entities:
# LR main # # LR main
- light.light_le_1 # - light.light_le_1
- light.light_le_2 # - light.light_le_2
- light.light_le_3 # - light.light_le_3
- light.light_le_4 # - light.light_le_4
# PC # # PC
- light.hue_ambiance_7 # - light.hue_ambiance_7
# LR ambiance # # LR ambiance
- light.living_room_ambient_main # - light.living_room_ambient_main
- light.light_lohas_2 # - light.light_lohas_2
- light.master_bedroom_main - light.master_bedroom_main
- light.bedside - light.bedside
- light.hallway
script: script:
turn_on_all_lights: turn_on_all_lights:
+51 -11
View File
@@ -1,15 +1,43 @@
# Depends on Plex integration (config flow): https://www.home-assistant.io/integrations/plex # Depends on Plex integration (config flow): https://www.home-assistant.io/integrations/plex
automation: input_text:
- alias: TV · Plex · Setup house for Plex plex_default_show:
trigger: name: Default show to start on plex
- platform: state icon: mdi:plex
entity_id:
- media_player.plex_shield_chromecast script:
- media_player.plex_shield_player start_default_show:
- media_player.plex_lg mode: restart
to: "playing" sequence:
action: - service: media_player.unjoin
entity_id: media_player.living_room
- service: media_player.select_source
entity_id: media_player.living_room
data:
source: TV
- service: media_player.turn_on
entity_id: media_player.living_room_tv
- wait_template: "{{ is_state('media_player.nvidia_shield', 'standby') or is_state('media_player.nvidia_shield', 'idle') }}"
- service: androidtv.adb_command
target:
entity_id: media_player.nvidia_shield
data:
command: "HOME"
- service: media_player.select_source
entity_id: media_player.nvidia_shield
data:
source: "Plex"
- delay: 00:00:01
- service: media_player.play_media
entity_id: media_player.plex_shield
data_template:
media_content_type: "EPISODE"
media_content_id: '{ "library_name": "TV Shows", "show_name": "{{ states("input_text.plex_default_show")}}", "episode.unwatched": true, "episode.inProgress": [true, false], "resume": 1, "sort": "addedAt:asc", "maxresults": 1 }'
- service: media_player.media_pause
entity_id: media_player.master_bedroom
plex_before_start:
sequence:
- service: media_player.unjoin - service: media_player.unjoin
entity_id: media_player.living_room entity_id: media_player.living_room
- service: media_player.select_source - service: media_player.select_source
@@ -43,12 +71,24 @@ automation:
- light.master_bedroom_main - light.master_bedroom_main
- light.kitchen - light.kitchen
automation:
- alias: TV · Plex · Setup house for Plex
trigger:
- platform: state
entity_id:
- media_player.plex_shield_chromecast
- media_player.plex_shield
- media_player.plex_lg
to: "playing"
action:
- service: script.plex_before_start
- alias: TV · Plex · Restore house after Plex - alias: TV · Plex · Restore house after Plex
trigger: trigger:
- platform: state - platform: state
entity_id: entity_id:
- media_player.plex_shield_chromecast - media_player.plex_shield_chromecast
- media_player.plex_shield_player - media_player.plex_shield
- media_player.plex_lg - media_player.plex_lg
from: "playing" from: "playing"
action: action:
+2 -2
View File
@@ -25,7 +25,7 @@ homekit:
- light.living_room_ambient - light.living_room_ambient
- light.hue_ambiance_7 - light.hue_ambiance_7
- binary_sensor.living_room_right_window_contact - binary_sensor.living_room_right_window_contact
- climate.living_room_radiator_mode - climate.living_room_valve
- climate.toshiba_ac - climate.toshiba_ac
- cover.living_room - cover.living_room
- media_player.living_room - media_player.living_room
@@ -67,13 +67,13 @@ homekit:
- media_player.bathroom - media_player.bathroom
- sensor.bathroom_weather_temperature - sensor.bathroom_weather_temperature
- sensor.bathroom_weather_humidity - sensor.bathroom_weather_humidity
- binary_sensor.bathroom_occupancy
# Hallway # Hallway
- light.hallway - light.hallway
- light.hallway_entrance - light.hallway_entrance
- light.hallway_main - light.hallway_main
- binary_sensor.hallway_motion_occupancy - binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
- group.hallway_motion - group.hallway_motion
- sensor.hallway_weather_temperature - sensor.hallway_weather_temperature
- sensor.hallway_weather_humidity - sensor.hallway_weather_humidity
+1 -3
View File
@@ -3,7 +3,7 @@ group:
name: All motion_sensors name: All motion_sensors
entities: entities:
- binary_sensor.hallway_motion_occupancy - binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy - binary_sensor.bathroom_motion_occupancy
- binary_sensor.kitchen_motion_occupancy - binary_sensor.kitchen_motion_occupancy
- binary_sensor.multisensor_motion - binary_sensor.multisensor_motion
@@ -11,5 +11,3 @@ group:
name: Hallway Motion name: Hallway Motion
entities: entities:
- binary_sensor.hallway_motion_occupancy - binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
# - binary_sensor.trisensor_home_security_motion_detection