Still iterating on the home cinema configuration

This commit is contained in:
Pierre committed 2026-09-26 16:43:24 +02:00
1 parent ed6f218968
commit ed59a72c3f
6 files changed
+232 -35

No files matched your search

+76 -23
View File
@@ -14,7 +14,7 @@ samsung_the_frame:
virtual_sensors:
default_values:
binary_sensor.tv_auto_shutdown: false
binary_sensor.tv_on: false
binary_sensor.is_tv_on: false
sensors:
value_selector.samsung_the_frame_target_state:
power_off:
@@ -22,14 +22,14 @@ samsung_the_frame:
- binary_sensor.is_everybody_sleeping or binary_sensor.is_living_room_sleeping or not binary_sensor.someone_home
- binary_sensor.projector_on or binary_sensor.projector_screen_down
hdmi: binary_sensor.vertex2_has_input_signal and not binary_sensor.projector_screen_down
manual: binary_sensor.tv_on and not binary_sensor.tv_auto_shutdown
manual: binary_sensor.is_tv_on and not binary_sensor.tv_auto_shutdown
tv_off: not binary_sensor.living_room_occupancy
art_mode: True
tv_state: sensor.samsung_the_frame_target_state
output_sensors:
is_on: binary_sensor.tv_on
is_on: binary_sensor.is_tv_on
is_art_mode: binary_sensor.tv_in_art_mode
tv_auto_shutdown: binary_sensor.tv_auto_shutdown
@@ -67,12 +67,30 @@ w4000i:
continuous_condition.projector_ready:
conditions: switch.living_room_projector_plug
time: 30
continuous_condition.has_allm_signal_for_a_while:
conditions: binary_sensor.vertex2_allm
time: 5
attributes_override:
icon: sensor.projector_icon
friendly_name: Projecteur
press_enter_event: send_projector_enter
press_enter_events:
vertex2_allm:
event_name: state_changed
event_data:
entity_id: binary_sensor.has_allm_signal_for_a_while
new_state:
state: "on"
apple_tv_mute_short_press:
event_name: state_changed
event_data:
entity_id: binary_sensor.ir_bridge_apple_tv_mute_button_short_press
old_state:
state: "off"
new_state:
state: "on"
projector_ready_conditions: binary_sensor.projector_ready
@@ -80,10 +98,10 @@ w4000i:
#cooling_down_sensor: binary_sensor.projector_cooling_down
smart_conditions:
trigger_conditions: binary_sensor.vertex2_has_input_signal
trigger_conditions: binary_sensor.vertex2_has_input_signal and binary_sensor.projector_screen_down
disable_conditions:
- self == 'unavailable'
- self == 'off' and not binary_sensor.projector_screen_down
#- self == 'off' and not binary_sensor.projector_screen_down
#- not binary_sensor.projector_screen_down
#- binary_sensor.projector_cooling_down
- switch.projector.warming_up
@@ -93,7 +111,10 @@ bravia_theatre:
class: SmartSwitch
entity: media_player.bravia_theatre
smart_conditions: binary_sensor.vertex2_has_input_signal
smart_conditions:
#trigger_conditions: binary_sensor.vertex2_has_input_signal
trigger_conditions: sensor.vertex2_output_selected == 'Projector' or input_boolean.use_bravia_theater_for_the_frame
blocking_conditions: not binary_sensor.vertex2_has_input_signal
projection_screen:
module: smartshutter
@@ -101,13 +122,26 @@ projection_screen:
entity: cover.living_room_projection_screen
close_position: 22
close_conditions: # close mean screen down
# when the projector is turn back on, it can happen that this condition is evaluated before projector_off_for_a_while is updated
# so I need to test both binary_sensor.projector_on and not binary_sensor.projector_off_for_a_while
trigger_conditions: binary_sensor.projector_on or not binary_sensor.projector_off_for_a_while
disable_conditions:
- binary_sensor.day_interval_night and not binary_sensor.projector_on
- binary_sensor.is_everybody_sleeping and not binary_sensor.projector_on
toggle_events:
apple_tv_mute_long_press:
event_name: state_changed
event_data:
entity_id: binary_sensor.ir_bridge_apple_tv_mute_button_long_press
old_state:
state: "off"
new_state:
state: "on"
# close_conditions: # close mean screen down
# # when the projector is turn back on, it can happen that this condition is evaluated before projector_off_for_a_while is updated
# # so I need to test both binary_sensor.projector_on and not binary_sensor.projector_off_for_a_while
# trigger_conditions: binary_sensor.projector_on or not binary_sensor.projector_off_for_a_while
# disable_conditions:
# - binary_sensor.day_interval_night and not binary_sensor.projector_on
# - binary_sensor.is_everybody_sleeping and not binary_sensor.projector_on
open_conditions: # close mean screen up
trigger_conditions: binary_sensor.projector_off_for_a_while
vertex_2:
module: vertex2
@@ -128,9 +162,9 @@ vertex_2:
2:
name: Playstation
icon: mdi:sony-playstation
# 3:
# name: Switch
# icon: mdi:nintendo-switch
3:
name: Switch
icon: mdi:nintendo-switch
output_config:
default:
@@ -150,17 +184,14 @@ vertex_2:
# trigger_conditions: binary_sensor.someone_home
# blocking_conditions:
# - binary_sensor.is_everybody_sleeping or binary_sensor.is_salon_sleeping
# - binary_sensor.vertex2_unreachable and not binary_sensor.tv_on and not binary_sensor.projector_on
# - binary_sensor.vertex2_unreachable and not binary_sensor.is_tv_on and not binary_sensor.projector_on
# mutetx0_conditions:
# trigger_conditions:
# - binary_sensor.is_sonos_amp_playing_tv and not media_player.piece_a_vivre.is_volume_muted
# - binary_sensor.is_hw_700_on
mutetx0_conditions: input_boolean.use_bravia_theater_for_the_frame
#filmmaker_mode_conditions: sensor.vertex2_input_select_tx0 == 'AppleTV'
output_selection:
Projector: binary_sensor.projector_on
Projector: binary_sensor.projector_screen_down
TV: True
# input_selection:
@@ -174,7 +205,29 @@ vertex_2:
vertex2_tcp_port: 2220
video_tx_signal_sensor: sensor.vertex2_video_signal
allm_sensor: binary_sensor.vertex2_allm
audio_out_signal_sensor: sensor.vertex2_audio_signal
output_selected_sensor: sensor.vertex2_output_selected
input_selected_sensor: sensor.vertex2_input_selected
unreachable_sensor: binary_sensor.vertex2_unreachable
unreachable_sensor: binary_sensor.vertex2_unreachable
use_bravia_theater_for_the_frame:
module: smartswitch
class: SmartSwitch
entity: input_boolean.use_bravia_theater_for_the_frame
toggle_events:
- toggle_use_bravia_theater_for_the_frame
apple_remote:
module: virtualevents
class: VirtualEvents
priority: 100 # default priority app is 50, since the virtual_events doesn't create any sensor but is based on sensor created by many app, it's important it's created last
virtual_events:
toggle_use_bravia_theater_for_the_frame:
event_name: toggle_use_bravia_theater_for_the_frame
event_condition: binary_sensor.is_tv_on and binary_sensor.ir_bridge_apple_tv_mute_button_short_press
+8 -5
View File
@@ -4,7 +4,7 @@ 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
default_values:
binary_sensor.tv_on: false
binary_sensor.is_tv_on: false
sensors:
binary_sensor.someone_home: person.maeva == 'home' or person.pierre == 'home' or (input_boolean.use_red_shelly_presence and binary_sensor.red_shelly_home)
@@ -23,7 +23,7 @@ virtual_sensors:
0:
- not binary_sensor.living_room_occupancy
- binary_sensor.projector_on and not binary_sensor.is_vertex2_content_idle
- binary_sensor.tv_on
- binary_sensor.is_tv_on
- light.living_room
- sensor.mezzanine_motion_light_level > 15
- binary_sensor.is_living_room_sleeping
@@ -34,7 +34,7 @@ virtual_sensors:
# home cinema sensors
binary_sensor.projector_on: switch.living_room_projector_plug and sensor.living_room_projector_plug_power > 50
binary_sensor.projector_screen_down: cover.living_room_projection_screen.current_position < 50
binary_sensor.projector_screen_down: cover.living_room_projection_screen.current_position < 90
continuous_condition.projector_off_for_a_while:
time: 90
default_value: on
@@ -44,11 +44,14 @@ virtual_sensors:
binary_sensor.is_apple_tv_on: media_player.apple_tv != 'off' and media_player.apple_tv != 'idle'
binary_sensor.is_xbox_on: binary_sensor.yetanotherpedro #media_player.xbox != 'off' and media_player.xbox != 'unavailable'
binary_sensor.is_playstation_on: switch.ps5_136_power
retain_condition.vertex2_has_input_signal:
retain_time: 10
sensor.vertex2_input_selected_icon: sensor.vertex2_input_selected.icon
retain_condition.vertex2_has_input_signal:
retain_time: 15
conditions:
trigger_conditions: (sensor.vertex2_video_signal and sensor.vertex2_video_signal != 'no signal') or sensor.vertex2_audio_signal
disable_conditions: binary_sensor.vertex2_unreachable
sensor_attributes:
icon: sensor.vertex2_input_selected_icon
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