I am wondering how to create an automation to long press a switch to dimm lights till the desired values.
Long press once to dimm up, long press the second time to dimm down
Third and fourth to change color temp.
I know that should create a loop but don't know how to configure it.
This is the device by the way:
https://www.zigbee2mqtt.io/devices/PTM_215Z.html
Integrate your EnOcean PTM 215Z via Zigbee2MQTT with whatever smart home infrastructure you are using without the vendor's bridge or gateway.