add some home cinema automation

This commit is contained in:
2026-06-21 09:30:33 +02:00
parent 85fb207ca0
commit 6310e39fd9
2 changed files with 72 additions and 11 deletions

View File

@@ -4,24 +4,48 @@ virtual_sensors:
priority: 10 # default priority app is 50, since most of them require sensors created by virtual sensors, it's important that virtual_sensors start first
sensors:
continuous_condition.is_apple_tv_idle:
time: 5
conditions: media_player.apple_tv == 'paused' or media_player.apple_tv == 'idle' or media_player.apple_tv == 'standby'
binary_sensor.is_apple_tv_on: media_player.apple_tv != 'off'
binary_sensor.someone_home: person.maeva == 'home' or person.pierre == 'home'
binary_sensor.is_dark_outside: sun.sun == 'below_horizon'
binary_sensor.is_dark_outside: sun.sun == 'below_horizon'
# living room sensors
value_selector.living_room_ambiance_light:
values:
0:
- not binary_sensor.living_room_occupancy
- binary_sensor.is_apple_tv_on and not binary_sensor.is_apple_tv_idle
- binary_sensor.projector_on and not binary_sensor.is_vertex2_content_idle
- light.living_room
- sensor.mezzanine_motion_light_level > 10
1: binary_sensor.is_everybody_sleeping
1:
- binary_sensor.is_everybody_sleeping
- binary_sensor.projector_on
2: true
# home cinema sensors
binary_sensor.projector_on: switch.living_room_projector_plug and sensor.living_room_projector_plug_power > 50
continuous_condition.projector_off_for_a_while:
time: 90
default_value: on
conditions: not binary_sensor.projector_on
# is_apple_tv_on is not reliable as the the apple tv integration sometimes return "paused" when it's actually off,
# you should use is_using_apple_tv instead for most automation
binary_sensor.is_apple_tv_on: media_player.apple_tv != 'off' and media_player.apple_tv != 'idle'
binary_sensor.is_xbox_on: media_player.xbox != 'off'
binary_sensor.is_playstation_on: switch.ps5_136_power
retain_condition.vertex2_has_input_signal:
retain_time: 10
conditions: sensor.hdfury_vertex2_07_output_tx0 or sensor.hdfury_vertex2_07_audio_output
binary_sensor.is_using_apple_tv: binary_sensor.is_apple_tv_on and binary_sensor.vertex2_has_input_signal and select.hdfury_vertex2_07_port_select_tx0 == 0
binary_sensor.is_using_xbox: binary_sensor.is_xbox_on and binary_sensor.vertex2_has_input_signal and select.hdfury_vertex2_07_port_select_tx0 == 1
binary_sensor.is_using_playstation: binary_sensor.is_playstation_on and binary_sensor.vertex2_has_input_signal and select.hdfury_vertex2_07_port_select_tx0 == 2
continuous_condition.is_vertex2_content_idle:
time: 5
conditions:
trigger_conditions:
- binary_sensor.is_using_apple_tv and (media_player.apple_tv == 'paused' or media_player.apple_tv == 'idle' or media_player.apple_tv == 'standby')
# - binary_sensor.is_using_playstation and sensor.ps5_136_activity == 'idle'
# - binary_sensor.is_using_xbox and not binary_sensor.yetanotherpedro_in_game
#p1p sensors
binary_sensor.p1p_is_printing:
trigger_conditions: sensor.garage_p1p_etat_de_l_impression != 'idle' and sensor.garage_p1p_etat_de_l_impression != 'finish' and sensor.garage_p1p_etat_de_l_impression != 'idle' and sensor.garage_p1p_etat_de_l_impression != 'offline'