Hi danieldeni,
Many thanks for your blueprint (and to those you based it on) !
I am using this to control 4 lights - 2 Philips hue and 2 Tapo multi-coloured lights.
With your code the dimming on the tapo lights was changing the brightness by approximately 3% but I wanted to make this 1%. I noticed that each click of the dial increased the raw data by 8 so I adjusted the variables section in the code as follows:
This code now means every small step rotation is a step of 1.
(I am new to HA blueprinting and I couldnât work out how to divide by 8 in one line!)
To dim the light in all the rotate left or right aliases I changed all references of:
brightness_step to brightness_step_pct
This means 1 click of the dial will change the brightness by 1% if the dial is moved slowly, and if the dial is moved quickly the brightness step will change accordingly. The dial automatically reports a larger step size which is great!
My Tapo lights change brightness from 1% to 100% in steps of 1% so I find this works best for these lights, particularly if you want to set it at the minimum setting as a night light. It also works well for the Philips lights, but they are less sensitive.
Feel free to integrate this in your blueprint if you or anyone else finds it useful!
I am only using Philips Hue lights and those have 255 steps of brightness as it doesnât target the % of the light but the raw brightness values through the step command. For Zigbee lights this is common, but I guess Wifi based lights like Tapo only have 100 steps using this?
Iâll need to check when I have time to make the step size configurable for this use case, as it will be too slow for Zigbee lights with your changes.
Hi @danieldeni - Iâve been using your Blueprint for a while now but I think I have run into an issue with using a Schedule.
My Hue downlights are switched my Clipsal Wiser switches so I have an automation that keeps the light state and switch state in sync but also using different light settings (brightness, colour temp) depending on the time of day.
I replicated those time of day settings in a Schedule, created via the UI:
Check the example I have in the start post. The additional data should be with these names per field:
brightness_pct: 30
color_temp_kelvin: 3333
Where you can put your own numbers of course, per preference.
Do keep in mind the Blueprint doesnât trigger the schedules automatically on changes, only if you press the button. I have a separate automation in place that triggers on schedule change, might integrate that later into the blueprint.
Thatâs an example for generic use yes. And might be updated in the future outside of my control.
color_temp was linked to mired in the past and was changed somewhere in 2024 to be based on kelvin. To avoid confusion I used color_temp_kelvin .
My start post has instructions for my blueprint specifically. You can use whichever names are set inside the blueprint, others are ignored as they are not put in the logic of the automations and variables.
@danieldeni
Great work and thank you for your efforts with this!
Is it possible to have it work so that toggling a light will retain itâs brightness setting?
E.g.
Button 1: Ceiling Light set to toggle
If I tap button 1 it will turn on my ceiling light as expected, and if I rotate the dial it changes brightness as expected, letâs say to 50% in my example.
If I then tap button 1 again it will turn the light off, as expected being a toggle.
If I tap button 1 once more the light toggles back on, but to 100% (or whatever the preset brightness is in the automation using your blueprint).
I would wish for my ceiling light to come back on at the pre-changed brightness, int this case 50%
Can you add functionality to enable and disable presets please?
I suppose more ideally than the above config would be to have each button select but not turn off a light with a single tap and either a long press or double tap to turn off the light. That does seem possible but itâs the returning to defaults that is throwing out my setup. It would be super handy to just leave the brightness to whatever I have set regardless of whatever else is going on with lights on/off.
AlsoâŚ
Would it be possible to have a slider for each light so that the % step can be adjusted for dimming and brightening the lights. I have some lights that step far more slowly than others and it would be good to be able to tweak them so the more slowly transitioning lights step up and down faster through brightness changes.
I guess as a âBrucey bonusâ it would be awesome to be able to use the dial to change temperature or the lights.
I need to check when I have time to change the logic where the presets are optional, but this will require quite a rework of the logic to do what you are asking, so donât know when I would be able to do that.
I am using short press for turn on and reset to preset, and long press for turn off, so I donât have this issue myself.
For the time being you can alter the way they react by not using the Light mode at all and use the Custom Actions to set your own Automations per different option. That way you can set a simple toggle without using the presets, the lights automatically store their last state so if you use a pure toggle command, it should restore the last state automatically.
The dimming and brightening steps are dynamically calculated, depending on the speed you turn the dial. I can check if I can create a factor that can be set to increase/decrease the speed to someoneâs preferences.
As requested, and replied before about the change temperature function, this is not supported by ZHA or Zigbee itself, so there is no way for me to implement it fluently. If I would want to implement it now, the blueprint would need to poll the light state to be able to change the colour temperature of the lights that way. There is no native Zigbee command to increase or decrease colour temp. Due to delays in Zigbee this will never be fluid. The dimming feature uses a built in Move function that doesnât poll the lights while dimming/brightening.
As it cannot be fluent, I am not sure how useful the function would be, as I use presets myself depending on time of day, I never change the colour temp manually.
And of course re: time to work on, I appreciate youâre doing this for free and do thank you for your efforts!
The issue I have re: tapping and long-presses is that unfortunately I have a neurological issues, so so the simpler my interactions with any device the better.
Using a single tap to turn on a light and tap to hold to turn off is kind of ok, as not much dexterity in that, but if I am changing between lights and adapting their brightnesses, if changing light 1, and then light 2, if I want to tweak light 1âs brightness just a little bit more, as stands presently (so far as I can tell) as soon as I tap on light 1, this sends a command to reset the brightness completely, which is both a bit jarring in the room, but also needing more rotation interactions.
I had initially expected the âLight:Turn onâ, to work more like a 'Light:Turn on (if not already on) OR select light/assigned function (if already on and just wanting to use the dial for that light or function).
I suppose to be somewhat âfancyâ it would be pretty cool to be able to use a timer - so that brightness settings could be stored for a given amount of time, before returning to âdefaultâ.
That way could make use of schedules still, but also allow for a bit of user input/override.
Noted re: temperature changes. Interesting that lights in HA do all have temperature sliders - Iâd not considered the âbehind the scenesâ complexity re: zigbee in this regard.
Iâll deffo have a play with the custom functions rather than light specific ones in the meantime though. This could work nicely with sunset/sunrise offsets
Did you try re-importing through the link in the startpost? The URL changed, so the existing blueprint canât be imported through Home Assistant directly.
Afterwards you will have two versions and once you have updated your Automations to use the new version, you can remove the old one with zha- in front of the filename.
Any next versions will not change in name anymore, so this would be a one time change.
The re-import button causes an error in my HomeAssistant, saying âUnable to re-import the blueprint: source not found.â Some investigation turned out there might be conflicting source urls for the previous and current version of the blueprint:
Yes, this is intended, Home Assistant doesnât support the renaming of a blueprint file so for your Home Assistant installation it will be a new blueprint. See a few posts above:
The link is now also without the randomid of the blob and will be pushed to main for future updates. So it should not break re-importing in the future anymore.
Ah, Iâve found where this went wrong. The next update should fix this.
Sadly there is no way to make triggers fully optional in a blueprint. By not selecting Z2M it will not run any automations based on data interpreted from the MQTT Broker.