I have v4 limitlessled and haven’t been able to get this working either, I assumed I’d made a mistake in copying the code somewhere, thanks for posting that @sendorm
I also have lifx and xiaomi philips bulbs so might give it a shot with those instead. I was just trying to get it working on one bulb first before mass replicating.
Not all smart bulbs are as good at handling a steam of brightness change requests,
I just received a colour yeelight yesterday from China, and I found it was not as responsive to successive brightness changes as my hue bulbs.
Hi, I’m very new with home assistant, and I’m very confused with the syntax, on one side you need to make a Jason template you use the configuration tools how ever, you use yaml on the configuration and not everything is supported through the configuration assistant.
Anyways, I want to use your script, and I can’t find a way to make work beacuse I don’t know how to translate it to the new “automation”, “script” files syntax.
any help how to will be appreciated.
also, I want to add that I have some simple automation working turning on and off light
Note: running Home Assistant v0.57.3 Docker Container on Synology NAS
Is there any possibility to set a max and min value?
If I dim down to long my 0-10 switch will be recognized as off in HASS and I cant dim it up until I shut it off and on again…
brightness: ‘{{states.light.YOURLIGHT.attributes.brightness - 10}}’
Going to give this a try now… my only problem is that i actually have 2 lights and 2 switches… i’m guessing i’ll need to put this in twice and change quite a lot of it to keep things unique?
I love packages @INTEL! It’s really a nice way of including new smart features in HASS without messing around in several different configurations files.
However, I can’t get your package to work. I’m trying to dim a Z-Wave ligh included through a Vera. Maybe this way of using Xiaomi switches only works for light devices directly included in HASS that have the dim feature?
The lights are of course dimmable! I’ve added the package as written and switched the parts with my own devices. However, nothing happens when I press the button. If I turn on the dimmable light and long press the light dim down to 0%. If I press again it never turn on or dim up.
Finally got around to trying this out tonight. Really great piece of script - Thank you so much!
I’m using it with MiLights atm, so the lights dim/brighten very slowly, but it works. Looking forward to trying this with my zwave dimmers soon.
I’ve also added my own bit of automation:
Single Click - toggle light on/off
Double Click - Jump to Max Brightness (and turn on boolean - ready to dim)
automation:
- alias: xiaomi Click to toggle Light
initial_state: 'on'
trigger:
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001XXXXXX
click_type: single
action:
- service: light.toggle
entity_id: light.XXXXXX
- alias: xiaomi Double Click to Max Brightness
trigger:
platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_158d0001XXXXXX
click_type: double
action:
- service: light.turn_on
entity_id: light.XXXXXX
data:
brightness: 250 #for some reason 255 did not work for me
- service: input_boolean.turn_off
entity_id: input_boolean.landing_dim