From 720d8587b58b6375d0616ce4a4a8243b6ea678b4 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sat, 25 Feb 2023 13:04:24 -0500 Subject: [PATCH] Account for the faint possibility that I'm still streaming at dawn... --- packages/tony.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/tony.yaml b/packages/tony.yaml index e2d8c81..5e39b04 100644 --- a/packages/tony.yaml +++ b/packages/tony.yaml @@ -32,8 +32,27 @@ automation: entity_id: sensor.twitch_ironnerd24 from: 'streaming' to: 'offline' + id: offline + - platform: time + at: "07:55:00" + id: time action: - - service: script.tony_stream_reset + - choose: + - conditions: + - condition: trigger + id: offline + sequence: + - service: script.tony_stream_reset + - conditions: + - condition: trigger + id: time + sequence: + - if: + - condition: state + entity_id: sensor.twitch_ironnerd24 + state: 'offline' + then: + - service: script.tony_stream_reset # TODO: Add actions when sleep mode is activated