Hello everyone,
here i am again looking for some help with an automation i am trying to build and although i have seen many similar posts, i was not able to make it work for my set up. I have an Aqara Mini Switch that supports long press hold and long press release and i am trying to use the feature to dim or brighten the light in the WC. So the intention is:
When i hold the button, the brightness increases smoothly. Here is a screenshot of the aqara button functions:
The light i have in the WC supports increase / decrease brightness but some how i need to make it work as if it is increasing or decreasing the brightness for as long as i hold the button. I thought to use the Repeat Until function in automations but some how it is not working for me.
Here is a screenshot of the light functions:
And here is the automation i tried to build:
alias: WC Light Brightness
description: ''
trigger:
- device_id: d49305d0c0a8eeb4e553f4a415fe03b2
domain: zha
platform: device
type: remote_button_long_press
subtype: remote_button_long_press
condition: []
action:
- repeat:
until:
- condition: state
entity_id: light.wc_light
state: '255'
attribute: brightness
sequence:
- device_id: 67a622f167413951530a00b4c623b8c1
domain: light
entity_id: light.wc_light
type: brightness_increase
mode: single
Could i please ask for your help to make it work? Also, in case the brightness is at 100% the next long press should start decreasing the brightness.
Thank you very much
Kind Regards
M




