#Long press to dimm

1 messages · Page 1 of 1 (latest)

signal storm
#

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

#

Long press to dimm

#

Oh yeah, just found this

#

I just want all in a single automation.
Single click to toggle lights as well

#
actions:
  - choose:
      - conditions:
          - condition: trigger
            id:
              - 1 pressed
        sequence:
          - repeat:
              sequence:
                - metadata: {}
                  data:
                    brightness_step_pct: 2
                  target:
                    entity_id: light.living_room_lights
                  action: light.turn_on
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 500
              while:
                - condition: trigger
                  id:
                    - 1 pressed