From: Giorgio Ravera Date: Mon, 21 Feb 2022 20:44:56 +0000 (+0100) Subject: Limited door light automation no early that 3pm. X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=8f9ad2b0790d2b5f468400f26c5fe29f93055096;p=homeassistant.git Limited door light automation no early that 3pm. --- diff --git a/automations/doors.yaml b/automations/doors.yaml index 91064b82..7bc373fd 100644 --- a/automations/doors.yaml +++ b/automations/doors.yaml @@ -16,7 +16,17 @@ entity_id: binary_sensor.porta_casa_contact to: 'on' - condition: "{{ (state_attr('sun.sun', 'elevation') | int) < 1 }}" + condition: + condition: and + conditions: + - condition: numeric_state + entity_id: sun.sun + value_template: "{{ state.attributes.elevation }}" + below: 1 + - condition: time + after: "15:00:00" + before: "05:00:00" + action: - delay: 00:00:01