When switching from the basic automation blueprint to one with a sun condition, lights are not switching off anymore. Lights are KNX and sensor is Homematic
mode: restart
max_exceeded: silent
trigger:
platform: state
entity_id: binary_sensor.bewmelder_auffahrt
from: 'off'
to: 'on'
condition:
- condition: or
conditions:
- condition: sun
after: sunset
after_offset: 60
- condition: sun
before: sunrise
before_offset: 45
action:
- service: light.turn_on
target:
entity_id:
- light.lampe_auffahrt
- light.lampe_aufgang
- wait_for_trigger:
platform: state
entity_id: binary_sensor.bewmelder_auffahrt
from: 'on'
to: 'off'
- delay: 120
- service: light.turn_off
target:
entity_id:
- light.lampe_auffahrt
- light.lampe_aufgang
id: '1641295954243'
alias: Lampen Auffahrt durch BewMelder
description:
What is binary_sensor.bewmelder_auffahrt?
The automation will only run when that binary sensor state changes, independently of the sun, you realize that, do you?
As a newby I never did an automation outside a blueprint, so I’m not sure I can answer these questions.
What I know is that the basic blueprint did the job perfectly well, outside the fact, that ligfhts switched on even during daylight (see below)
With my current knowledge I’m not in a position to add/merge the sun conditions into this code.
How should the lines in automations.yaml look like to get this done (ignoring the blueprints)?
First thanks for the responses. The whole things with these lights is getting more and more confusing.
I tried to make use of your comments, but realized that my basics are not in a good shape:
I deleted all automations defined in automations.yaml or configuration.yaml. I deleted all automations from the blueprint GUI section. Nevertheless,
the light switches on 7:49 every morning and off at 18:40
when I create a blueprint, it’s not visible butr shows up in automations.yaml
Looks like a ghost is active from previous settings which makes new settings not working as well