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

View File

@@ -25,7 +25,7 @@ cards:
entities:
- input_boolean.heating_enabled
- input_number.radiators_temperature
- climate.living_room_radiator_mode
- climate.living_room_valve
- climate.bedroom_radiator_mode
- climate.kitchen_radiator_mode
- script.turn_on_all_radiators

View File

@@ -100,6 +100,7 @@ cards:
- automation.tv_state_sync_shield_state
- automation.tv_prepare_for_casting
- type: divider
- automation.movie_mode_change
- automation.tv_plex_setup_house_for_plex
- automation.tv_plex_restore_house_after_plex
- automation.media_sonos_put_beam_in_night_mode

View File

@@ -71,7 +71,7 @@ cards:
- type: custom:battery-entity-row
entity: sensor.hallway_motion_battery
- type: custom:battery-entity-row
entity: sensor.hallway_motion_2_battery
entity: sensor.bathroom_motion_battery
- type: custom:battery-entity-row
entity: sensor.guest_bedroom_weather_battery
- type: custom:battery-entity-row
@@ -119,7 +119,7 @@ cards:
- sensor.front_door_linkquality
- sensor.hallway_weather_linkquality
- sensor.hallway_motion_linkquality
- sensor.hallway_motion_2_linkquality
- sensor.bathroom_motion_linkquality
- type: divider
- sensor.guest_bedroom_weather_linkquality

View File

@@ -60,7 +60,7 @@
- type: custom:decluttering-card
template: floorplan_state_with_icon
variables:
- entity: climate.living_room_radiator_mode
- entity: climate.living_room_valve
- top: 86%
- left: 77.8%
- icon: mdi:radiator

View File

@@ -136,7 +136,7 @@ card:
service: script.toshiba_ac_toggle
- type: custom:button-card
template: [v3_button_radiator, v3_tablet_button]
entity: climate.living_room_radiator_mode
entity: climate.living_room_valve
name: "Living room"
- type: custom:button-card
template: [v3_button_radiator, v3_tablet_button]

View File

@@ -21,6 +21,11 @@
- type: custom:button-card
template: v3_chip
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
template: v3_section_title

View File

@@ -47,13 +47,27 @@
template: v3_horizontal_stack_card
variables:
- 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
template: v3_scene
entity: scene.bedroom_neon
name: Neon
variables:
scene_color_1: rgb(255, 0, 190)
scene_color_2: rgb(0, 255, 190)
scene_color_1: rgb(0, 255, 190)
scene_color_2: rgb(255, 0, 190)
- type: custom:button-card
template: v3_scene
entity: scene.bedroom_ambient_neon
@@ -61,25 +75,12 @@
variables:
scene_color_1: rgb(255, 0, 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
template: v3_scene
entity: scene.bedroom_ambient_default
name: Ambient regular
variables:
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
template: v3_scene
entity: scene.bedroom_ambient_pink

View File

@@ -30,10 +30,7 @@
template: v3_chip_name
entity: binary_sensor.hallway_motion_occupancy
name: Motion
- type: custom:button-card
template: v3_chip_name
entity: binary_sensor.hallway_motion_2_occupancy
name: Motion 2
- type: custom:decluttering-card
template: v3_section_title

View File

@@ -28,6 +28,16 @@
template: v3_chip_name
entity: binary_sensor.living_room_right_window_contact
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
cards:
- type: custom:button-card
@@ -146,7 +156,7 @@
service: script.toggle_living_room_cover
- type: custom:button-card
template: v3_button_radiator
entity: climate.living_room_radiator_mode
entity: climate.living_room_valve
name: Radiator
- type: custom:button-card
template: v3_button_ac

View File

@@ -76,6 +76,11 @@
entity: binary_sensor.pi_hole_enabled
name: 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
template: v3_section_title
@@ -115,9 +120,13 @@
template: v3_button
entity: light.browser_kitchen
name: Kitchen Dashboard
- type: entities
title: "Plex"
entities:
- input_text.plex_default_show
- script.start_default_show
- type: entities
entities:
- type: divider
- input_text.wake_up_spotify_playlist
- input_number.wake_up_volume
- input_number.bathroom_high_volume

View File

@@ -39,7 +39,6 @@ cards:
- type: glance
entities:
- entity: binary_sensor.hallway_motion_occupancy
- entity: binary_sensor.hallway_motion_2_occupancy
- entity: sensor.hallway_motion_illuminance_lux
- entity: sensor.hallway_motion_battery
@@ -253,8 +252,8 @@ cards:
- margin-left: 8px
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
entity: binary_sensor.hallway_motion_2_occupancy
name: Hallway
entity: binary_sensor.bathroom_motion_occupancy
name: Bathroom
- type: custom:button-card
template: [v3_tablet_button, v3_popup_button]
entity: binary_sensor.multisensor_motion

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

View File

@@ -26,10 +26,10 @@ automation:
- sensor.bathroom_weather_battery
- sensor.bathroom_switch_battery
- sensor.bathroom_motion_battery
- sensor.hallway_weather_battery
- sensor.hallway_motion_battery
- sensor.hallway_motion_2_battery
- sensor.guest_bedroom_weather_battery
- sensor.terrarium_weather_battery

View File

@@ -16,7 +16,7 @@ group:
all_radiators:
name: "All Radiators"
entities:
- climate.living_room_radiator_mode
- climate.living_room_valve
- climate.bedroom_radiator_mode
- climate.kitchen_radiator_mode
@@ -66,12 +66,12 @@ script:
- service: climate.turn_on
entity_id:
- climate.bedroom_radiator_mode
- climate.living_room_radiator_mode
- climate.living_room_valve
- climate.kitchen_radiator_mode
- service: climate.set_temperature
entity_id:
- climate.bedroom_radiator_mode
- climate.living_room_radiator_mode
- climate.living_room_valve
- climate.kitchen_radiator_mode
data_template:
temperature: "{{ states('input_number.radiators_temperature') | int | default(25) }}"
@@ -113,11 +113,11 @@ automation:
- condition: not
conditions:
- condition: state
entity_id: climate.living_room_radiator_mode
entity_id: climate.living_room_valve
state: "off"
sequence:
- service: climate.turn_off
entity_id: climate.living_room_radiator_mode
entity_id: climate.living_room_valve
- service: logbook.log
data:
name: "💨 Climate module · "
@@ -128,12 +128,12 @@ automation:
entity_id: binary_sensor.living_room_right_window_contact
state: "off"
- condition: state
entity_id: climate.living_room_radiator_mode
entity_id: climate.living_room_valve
state: "off"
sequence:
- service: script.maybe_turn_radiator_on
data:
entity_id: climate.living_room_radiator_mode
entity_id: climate.living_room_valve
- service: logbook.log
data:
name: "💨 Climate module · "

View File

@@ -1,34 +1,32 @@
script:
apply_bedroom_ambient_neon:
bedroom_scene_default:
sequence:
- service: scene.turn_on
entity_id: scene.bedroom_ambient_neon
apply_bedroom_neon:
entity_id: scene.bedroom_default
- service: media_player.media_stop
entity_id: media_player.master_bedroom
bedroom_scene_1:
sequence:
- service: light.turn_on
entity_id: light.master_bedroom_main
- delay: "00:00:01"
- service: light.turn_on
entity_id: light.master_bedroom_main
- service: scene.turn_on
entity_id: scene.bedroom_pink
bedroom_scene_1_music:
sequence:
- service: scene.turn_on
entity_id: scene.bedroom_pink
- service: media_player.shuffle_set
entity_id: media_player.master_bedroom
data:
rgb_color: [255, 0, 63]
brightness: 153
- delay: "00:00:02"
- service: scene.turn_on
entity_id: scene.bedroom_ambient_neon
apply_bedroom_pink:
sequence:
- service: light.turn_on
entity_id: light.master_bedroom_main
- delay: "00:00:01"
- 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
shuffle: true
- service: media_player.volume_set
entity_id: media_player.master_bedroom
data_template:
volume_level: "{{ '0.3' if now().hour <= 23 else '0.15' }}"
- service: media_player.play_media
entity_id: media_player.master_bedroom
data_template:
media_content_type: "music"
media_content_id: "https://open.spotify.com/playlist/5b13IkygqCYveAlyrv34vB?si=3ac0c03fe65c4611"
scene:
- name: Bedroom Neon
@@ -88,8 +86,8 @@ scene:
color_temp: 350
light.bedside:
state: "on"
color_temp: 359
brightness: 255
rgb_color: [255, 36, 145]
brightness: 230
automation:
- alias: Lighting · Bedroom · Door open

View File

@@ -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:
- name: Living Room Ambient Neon
icon: "mdi:weather-night"

View File

@@ -88,21 +88,19 @@ light:
- platform: group
name: On after dark
entities:
# LR main
- light.light_le_1
- light.light_le_2
- light.light_le_3
- light.light_le_4
# PC
- light.hue_ambiance_7
# LR ambiance
- light.living_room_ambient_main
- light.light_lohas_2
# # LR main
# - light.light_le_1
# - light.light_le_2
# - light.light_le_3
# - light.light_le_4
# # PC
# - light.hue_ambiance_7
# # LR ambiance
# - light.living_room_ambient_main
# - light.light_lohas_2
- light.master_bedroom_main
- light.bedside
- light.hallway
script:
turn_on_all_lights:

View File

@@ -1,15 +1,43 @@
# Depends on Plex integration (config flow): https://www.home-assistant.io/integrations/plex
automation:
- alias: TV · Plex · Setup house for Plex
trigger:
- platform: state
entity_id:
- media_player.plex_shield_chromecast
- media_player.plex_shield_player
- media_player.plex_lg
to: "playing"
action:
input_text:
plex_default_show:
name: Default show to start on plex
icon: mdi:plex
script:
start_default_show:
mode: restart
sequence:
- 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
entity_id: media_player.living_room
- service: media_player.select_source
@@ -43,12 +71,24 @@ automation:
- light.master_bedroom_main
- 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
trigger:
- platform: state
entity_id:
- media_player.plex_shield_chromecast
- media_player.plex_shield_player
- media_player.plex_shield
- media_player.plex_lg
from: "playing"
action:

View File

@@ -25,7 +25,7 @@ homekit:
- light.living_room_ambient
- light.hue_ambiance_7
- binary_sensor.living_room_right_window_contact
- climate.living_room_radiator_mode
- climate.living_room_valve
- climate.toshiba_ac
- cover.living_room
- media_player.living_room
@@ -67,13 +67,13 @@ homekit:
- media_player.bathroom
- sensor.bathroom_weather_temperature
- sensor.bathroom_weather_humidity
- binary_sensor.bathroom_occupancy
# Hallway
- light.hallway
- light.hallway_entrance
- light.hallway_main
- binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
- group.hallway_motion
- sensor.hallway_weather_temperature
- sensor.hallway_weather_humidity

View File

@@ -3,7 +3,7 @@ group:
name: All motion_sensors
entities:
- binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
- binary_sensor.bathroom_motion_occupancy
- binary_sensor.kitchen_motion_occupancy
- binary_sensor.multisensor_motion
@@ -11,5 +11,3 @@ group:
name: Hallway Motion
entities:
- binary_sensor.hallway_motion_occupancy
- binary_sensor.hallway_motion_2_occupancy
# - binary_sensor.trisensor_home_security_motion_detection