diff --git a/packages/integrations/awtrix_light.yaml b/packages/integrations/awtrix_light.yaml new file mode 100644 index 00000000..74523efd --- /dev/null +++ b/packages/integrations/awtrix_light.yaml @@ -0,0 +1,21 @@ +# Created by Danny Tsang + +script: + send_bedroom_clock_notification: + alias: Send Bedroom Clock Notification + fields: + message: + description: Message to post + required: true + selector: + text: + multiline: true + sequence: + - service: mqtt.publish + data: + topic: "{{ states('sensor.bedroom_clock_device_topic')}}/notify" + payload_template: >- + "{ + 'text': '{{ message }}', + 'duration': 5 + }" diff --git a/packages/integrations/sleep_as_android.yaml b/packages/integrations/sleep_as_android.yaml index 6ffd41c0..b06a17f8 100644 --- a/packages/integrations/sleep_as_android.yaml +++ b/packages/integrations/sleep_as_android.yaml @@ -282,6 +282,15 @@ automation: title: ":zzz: Sleep as :robot_face: Android" log_level: "Normal" default: [] + - if: + - condition: state + entity_id: light.bedroom_clock_matrix + state: "off" + then: + - service: light.turn_on + data: {} + target: + entity_id: light.bedroom_clock_matrix mode: single - id: "1667424349110" alias: "Sleep As Android: Stop Sleep Timer" diff --git a/packages/rooms/bedroom.yaml b/packages/rooms/bedroom.yaml index bbad6f7f..fbdb28e1 100644 --- a/packages/rooms/bedroom.yaml +++ b/packages/rooms/bedroom.yaml @@ -452,6 +452,15 @@ automation: target: entity_id: scene.bedroom_dim_ambient_light default: [] + - if: + - condition: state + entity_id: light.bedroom_clock_matrix + state: "off" + then: + - service: light.turn_on + data: {} + target: + entity_id: light.bedroom_clock_matrix mode: single - id: "1621713867762" alias: "Bedroom: No Motion" @@ -1419,16 +1428,26 @@ script: bedroom_sleep: alias: Bedroom Sleep sequence: - - if: - - condition: state - entity_id: input_select.home_mode - state: "Guest" - then: - - service: script.asleep_turn_everything_off - data: {} - else: - - service: script.turn_everything_off - data: {} + - parallel: + - if: + - condition: state + entity_id: input_select.home_mode + state: "Guest" + then: + - service: script.asleep_turn_everything_off + data: {} + else: + - service: script.turn_everything_off + data: {} + - if: + - condition: state + entity_id: light.bedroom_clock_matrix + state: "on" + then: + - service: light.turn_off + data: {} + target: + entity_id: light.bedroom_clock_matrix mode: single icon: mdi:sleep