1
0

Add bedroom tv button

This commit is contained in:
Przemek Grondek 2023-08-21 23:42:17 +02:00
parent bcd8c04b30
commit dbccbb1387
3 changed files with 42 additions and 4 deletions

View File

@ -0,0 +1,32 @@
- id: bedroom_tv_button_off
alias: '[Bedroom] TV button off'
mode: single
trigger:
- device_id: 4d5298037e93ba11438409bff01b5005
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_off
action:
- service: switch.turn_off
target:
entity_id: switch.bedroom_mitv_on_off
- delay:
seconds: 1
- service: switch.turn_on
target:
entity_id: switch.bedroom_mitv_on_off
- id: bedroom_tv_button_on
alias: '[Bedroom] TV button on'
mode: single
trigger:
- device_id: 4d5298037e93ba11438409bff01b5005
domain: zha
platform: device
type: remote_button_short_press
subtype: turn_on
action:
- service: media_player.toggle
target:
entity_id: media_player.bedroom_tv

View File

@ -213,6 +213,12 @@
platform: device platform: device
type: device_offline type: device_offline
subtype: device_offline subtype: device_offline
# Bedroom TV button
- device_id: 4d5298037e93ba11438409bff01b5005
domain: zha
platform: device
type: device_offline
subtype: device_offline
# Bedroom window # Bedroom window
- device_id: f6bbab8171167a6adaeee8e9df5e1e44 - device_id: f6bbab8171167a6adaeee8e9df5e1e44
domain: zha domain: zha

View File

@ -1,13 +1,14 @@
good_night: good_night:
alias: Good Night alias: Good Night
sequence: sequence:
- service: script.cctv_on
- service: alarm_control_panel.alarm_arm_home
entity_id: alarm_control_panel.home_alarm
- service: input_select.select_option - service: input_select.select_option
data: data:
option: Night option: Night
entity_id: input_select.home_mode entity_id: input_select.home_mode
- service: script.bedroom_lights_on
- service: script.cctv_on
- service: alarm_control_panel.alarm_arm_home
entity_id: alarm_control_panel.home_alarm
- choose: - choose:
- conditions: - conditions:
- condition: state - condition: state
@ -68,7 +69,6 @@ good_night:
- light.office - light.office
- light.kitchen_lights - light.kitchen_lights
- light.bedroom_lights - light.bedroom_lights
- light.bed_lamps
- light.bed_lightstrip - light.bed_lightstrip
- light.kitchen_sink_lighstrip - light.kitchen_sink_lighstrip
- light.bathroom_lights - light.bathroom_lights