I was trying to set dimmer via Rule Machine, but kept getting these errors in log with no change in level.
I noticed in the device handler that there are two fields for setLevel. As soon as one of them are empty, the same error is visible in the log and the level will not change.
So, I guess that Rule Machine only tries to set one of the values, and therefore runs into this error? What is the purpose of the "second" field (I can't trial and error, as I have to fill out both).
Maybe I have missed something obvious.
EDIT: Okay, I had missed something obvious. If I specify a "Transition Time", everything works. Maybe a default value could prevent some confusion there?
First value is brightness in %, from 0-100. Not all devices support 0. Second value is fade time in seconds. Not all devices support fade time, but a value is required for devices that do.
@mike.maxwell there was a suggestion quite a while back to add descriptive labels to the dimmer numbers. Any chance thatβs on the short list?
I believe the problem is that empty fields = Null. And you can't do math on Null. Two workarounds, 1) fill in the blanks, put a number in, even zero. 2) add a null detect/replace in the driver(s) where the error is produced.
Example:
I had the same error occur with the Aeon MultiSensor6 V1 DH on line 443
I then (of course) found I had to do it in 3-5 other places, but now my standard lazy way of completing the Preferences of the device doesn't throw errors.
A replacement zigbee driver (generic zigbee ct bulb) will be in the next release, it will be replacing this one.
Preferences include selectable default transition time, which is used for both the level and temp changes and an option to disable ct updates from turning the bulb on, this will allow for setting the color temp while the bulb is turned off.