From 2c500b43a31ccf49a07b8c585b957b045083530c Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sun, 7 Jan 2024 02:17:40 +0100 Subject: [PATCH] Add automation to turn off lamp at night --- configuration/automations/bedroom-tv.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configuration/automations/bedroom-tv.yaml b/configuration/automations/bedroom-tv.yaml index 309bcac..8737dce 100644 --- a/configuration/automations/bedroom-tv.yaml +++ b/configuration/automations/bedroom-tv.yaml @@ -76,3 +76,20 @@ - light.bedroom_lights - light.bed_lightstrip - light.bed_lamps + +- id: bedroom_lamp_off_at_night + description: '[Bedroom] Turn off lamps at night' + mode: single + trigger: + - platform: state + entity_id: + - media_player.bedroom_tv + to: "off" + for: + hours: 0 + minutes: 5 + seconds: 0 + action: + - service: light.turn_off + target: + entity_id: light.bed_lamps