From 5845d247e5dd8cd4acb1b9332f6d9bf9d4eac261 Mon Sep 17 00:00:00 2001 From: Claus Dethlefsen Date: Mon, 21 Feb 2022 19:02:13 +0100 Subject: [PATCH] Changed entity to _2 --- include/automations/lysindkorsel.yaml | 41 ++++++++++++++++++--------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/include/automations/lysindkorsel.yaml b/include/automations/lysindkorsel.yaml index 80a01a6..2cb8dfc 100644 --- a/include/automations/lysindkorsel.yaml +++ b/include/automations/lysindkorsel.yaml @@ -6,22 +6,30 @@ platform: time at: "06:00:00" condition: - - condition: state # from sunset until sunrise - entity_id: sun.sun - state: 'below_horizon' + - condition: numeric_state + entity_id: sensor.indkorsel_sensor_illuminance + below: 90 +# - condition: state # from sunset until sunrise +# entity_id: sun.sun +# state: 'below_horizon' action: - service: light.turn_on data: - entity_id: light.indkorsel + entity_id: light.indkorsel_2 - alias: 'Sluk lys indkørsel morgen' trigger: - platform: sun - event: sunrise + platform: numeric_state + entity_id: sensor.indkorsel_sensor_illuminance + below: 90 + for: + minutes: 3 +# platform: sun +# event: sunrise action: - service: light.turn_off data: - entity_id: light.indkorsel + entity_id: light.indkorsel_2 - alias: 'Tænd lys indkørsel aften' trigger: @@ -33,7 +41,7 @@ action: - service: light.turn_on data: - entity_id: light.indkorsel + entity_id: light.indkorsel_2 - alias: 'Sluk lys indkørsel aften' trigger: @@ -42,7 +50,7 @@ action: - service: light.turn_off data: - entity_id: light.indkorsel + entity_id: light.indkorsel_2 - alias: 'Tænd lys indkørsel ved bevægelse' @@ -54,13 +62,18 @@ - condition: time after: '22:00:10' before: '05:54:00' - - condition: state - entity_id: sun.sun - state: below_horizon + - condition: numeric_state + entity_id: sensor.indkorsel_sensor_illuminance + below: 80 +# for: +# minutes: 3 +# - condition: state +# entity_id: sun.sun +# state: below_horizon action: - service: light.turn_on data: - entity_id: light.indkorsel + entity_id: light.indkorsel_2 - alias: 'Sluk lys indkørsel 15 min efter bevægelse' trigger: @@ -79,6 +92,6 @@ action: service: light.turn_off data: - entity_id: light.indkorsel + entity_id: light.indkorsel_2