This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
Philips Hue Fade in
Hi,
I have a lot of Philips Hue devices hooked up to my Homey (with the Hue bridge) which if working fine. But i would love them to be able to fade in or out slowly, to make the transition's more smooth. Is that possible? The timeout is just postponing the action...
Any tips?
Dennis
I have a lot of Philips Hue devices hooked up to my Homey (with the Hue bridge) which if working fine. But i would love them to be able to fade in or out slowly, to make the transition's more smooth. Is that possible? The timeout is just postponing the action...
Any tips?
Dennis
Comments
Unfortunately, Homey doesn't provide basic stuff like a 'while loop' or 'case statements', so you have to manually simulate them with a number of flows:
When Triggered - If "Current brightness is smaller than Bulb brightness" - Then raise Bulb brightness by (e.g.) 0.05 (which is 5%) and trigger the same flow after 10 seconds.
This way it loops until it has either reached (or slightly passed, maximum of 4%) the current brightness (in practice I don't see the difference of 5%, but maybe you do so maybe you can do it per percent and use a shorter timeout?)
I created four identical looping flows:
One for raising the brightness
One for lowering the brightness
One for raising the color
One for lowering the color
They are triggered by another flow that checks if the target color or target brightness is changed, and to prevent making a lot of those, I simply execute all four loops above and only the relevant one(s) will actually do something (due to the if-statement).
With the setup above, you'll need to keep in mind that if you DO want to change the brightness quickly (via a button or something) that you cange both the target value and the current value, else it will revert back slowly if something else triggers the target