I have a bunch of GU10 bulbs (Innr brand) in a group linked to a Hue hub. In my floorplan I have been using a touch on the room to TOGGLE the lights. However I have found that sometimes I have a light which gets out of sync and stays on.
I found this thread Automation to toggle light and decided to try and implement it in floorplan.yaml as follows:
- name: Toggle meals room lights
entities:
- light.meals_room
states:
- state: 'on'
class: 'light-on'
- state: 'off'
class: 'light-off'
action: # https://community.home-assistant.io/t/automation-to-toggle-light/54795
service_template: >
light.{% if is_state('light.meals_room', 'on') %}turn_off{% else %}turn_on{% endif %}
BUT instead of just turning on or off the lights it is popping up a dialog box for me to do it. I have checked in the template editor and everything looks ok. Anybody who can enlighten me as to why this isn’t just working as before. That is, turning the lights on and off based on the existing state?
EDIT: After much testing I can only conclude service_template doesn’t work in floorplan?