I am just checking what the correct way of setting up a switch with some lights.
I have just go a TuYa TS0041 control via MQTT | zigbee2mqtt.io switch which I plan on using to control six GU10 Ikea bulbs.
I have the bulbs grouped in zigbee2mqtt and this group is then exposed to HA via configurationm.yaml.
The switch has separate actions for single press, double press and hold. Am I right in thinking that this has to be done via automations? There is no shortcut to link the switch and the lights?
Assuming automations then I guess I need to have separate automations per action?
I have created an automation to toggle the lights on a single press
Trigger
trigger type -> Device
device -> my switch
trigger -> "single" action
Actions
action type -> call service
service -> light.toggle
entity -> light group entity
Is this the best way to do this?
I have also attempted to dim the lights on the hold action but I cannot figure this bit out. I can get it to set the brightness to a specific level but not to decrement it (and I guess go back to 100% when it gets to 0). How do I configure this through the UI?