I’m trying to make a simple button automation using a flic bluetooth button.
It works perfectly if both lights are powered. But if i manually have 1 switch turned off the automation does nothing.
Here is my group:
bed:
name: Bedroom
entities:
- light.Bedroom
- light.Computer
And here is my automation:
automation:
- alias: switch lights in bedroom
trigger:
platform: event
event_type: flic_click
event_data:
button_name: flic_xxxxxxxxxxx
click_type: single
action:
service_template: >
{% if is_state('group.bed', 'off') %}
homeassistant.turn_on
{% else %}
homeassistant.turn_off
{% endif %}
entity_id: group.bed