diff --git a/configuration/automations/bedroom-tv-button.yaml b/configuration/automations/bedroom-tv-button.yaml new file mode 100644 index 0000000..b4dacbc --- /dev/null +++ b/configuration/automations/bedroom-tv-button.yaml @@ -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 diff --git a/configuration/automations/info-unavailable-notice.yaml b/configuration/automations/info-unavailable-notice.yaml index e5e246c..3cbd80d 100644 --- a/configuration/automations/info-unavailable-notice.yaml +++ b/configuration/automations/info-unavailable-notice.yaml @@ -213,6 +213,12 @@ platform: device type: device_offline subtype: device_offline + # Bedroom TV button + - device_id: 4d5298037e93ba11438409bff01b5005 + domain: zha + platform: device + type: device_offline + subtype: device_offline # Bedroom window - device_id: f6bbab8171167a6adaeee8e9df5e1e44 domain: zha diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 44ca2fd..bf7d064 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -1,13 +1,14 @@ good_night: alias: Good Night sequence: - - service: script.cctv_on - - service: alarm_control_panel.alarm_arm_home - entity_id: alarm_control_panel.home_alarm - service: input_select.select_option data: option: Night 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: - conditions: - condition: state @@ -68,7 +69,6 @@ good_night: - light.office - light.kitchen_lights - light.bedroom_lights - - light.bed_lamps - light.bed_lightstrip - light.kitchen_sink_lighstrip - light.bathroom_lights