Arilux_AL-LC0X
Arilux_AL-LC0X copied to clipboard
[Feature] Add ability to turn on/off with transition
I'd like to request a feature so that when I turn off the device it fades into black with the specified transition
duration.
For example:
{ "state": "ON", "transition": 3 }
would turn on the lights with a black to color transition of 3 seconds.
{ "state": "OFF", "transition": 1 }
would turn on the lights with a color to black transition of 1 second.
This already works does it not? I know that if I send an MQQ Json message from HomeAssistant with transition: 5 the lights will transition on/off over 5 seconds.
So, how such a MQTT message should look like exactly?
Because this one does not work:
{ "state": "OFF", "transition": 5 }
This one works:
{ "color": { "r":255, "g":255, "b":255 }, "transition": 5 }
but this is not what I requested in this ticket.
I'm not sure on your specific formatting or how you are sending the message. I use Home Automation.
So my scene contains a command for my MagicHome controller (running this firmware of course) like this:
light.kitchen_cupboard_leds:
state: on
transition: 5
brightness: 120
rgb_color: [255, 99, 62]
Please read the title of this ticket carefully. I'm talking about turning on or off with a transition. Not changing colors.
Ok. I just tried without any colours.
- name: Kitchen Dining test entities: light.kitchen_island_leds: state: on transition: 5 light.kitchen_cupboard_leds: state: on transition: 5
It works fine. Both the above lights are MagicHome rgb controllers with this firmware on. They both started in an off state then slowly transitioned to on over 5 seconds to their last colour.
I agree with papaiatis,
transition with only state changes without color mentioning does not work.
I am working on a version with different way to handle transitions and allow to add more transitions easily. However, I am changing a lot of thing quite a bit. It will only support JSON and only HSB with white 1 and white 2 colors. So it should be mostly backwards compatible but you have to start feeding it with HSB instead of RGB. So om the sending end things might get easer (at least in openhab). I am also planning to make short duration transitions with fade in/out in shorter time frames.
if anybody is interested I will put it on github..
quick update: I have everything working now except one transition I need for myself (5 minute or more slow transition between two color states).
Here is a branch where this issue is solved https://github.com/rvt/Arilux_AL-LC0X/tree/redesign
Note: It´s not a drop-in replacement because color model is changed from RGB to HSB and some things are changed to follow this design. It should be easy to convert though. If there is really a need for RGB model I can see what I can do but I just assumed that all control software (openHAB, Home assistant etc) can output HSB