@LeoSum wrote:
Hi there,
I am trying to set up an automation for my bedroom light switch (Homematic wireless swicht integrated via Homegear; working) and my Hue lights to do the following:
- off pressed:
- when on: turn lights off
- when off: nightlight scene
When the lights are off and I press the off switch (expecting to switch to nightlight scene), the nightlight goes on for a brief moment, then the light go out again.
I am suspecting that the trigger (homematic.keypress) stays active for two long so that the first automation is triggered right after the lights went on and its condition (lights on) are met.
How do I prevent this from happening?
Here are the two involved automations:
- alias: 'bedroom_lights_off' trigger: platform: event event_type: homematic.keypress event_data: name: KEQ1101060 channel: 2 param: PRESS_SHORT condition: condition: state entity_id: light.lightstrip_bedroom state: 'on' action: - service: light.turn_off entity_id: - light.lightstrip_bedroom - alias: 'bedroom_lights_nightlight' trigger: platform: event event_type: homematic.keypress event_data: name: KEQ1101060 channel: 2 param: PRESS_SHORT condition: condition: state entity_id: light.lightstrip_bedroom state: 'off' action: - service: light.turn_on data: entity_id: light.lightstrip_bedroom brightness: 1 color_temp: 500
Posts: 1
Participants: 1