Frame label="Lamp VB VR 01" {
Switch item=lamp001_schakelaar
Slider item=lamp001_dimmer
Slider item=lamp001_kleurtemp
} // end of Frame
Rules: No Rules configured for this item
Services: No Services configured for this item
If logs where generated please post these here using code fences:
Log show communication with the temperature settings of the bulb but a slider goes from value 0 - 100 and the temperature is done with 153-500. So that is whats is going wrong. Is there any way to change the slider values (minValue/maxValue/step) don’t work on the slider. They also don’t do anything on the Setpoint declaration.
I have been going at this all night. And searched on in the community and on google and on the tasmota github pages but nothing seems to work.
You defined the ‘kleurtemperatuur’ item as a standard dimmer, and that will not understand anything other than ON/OFF or a value between 0 (=OFF) and 100 (=ON) AFAIK. It is basically a percentage.
For most light bulbs that support color temperature like IKEA TRÄDFI or Philips/Signify Hue, there is support in the binding for color temperature. For instance, the Hue binding translate the value for color temperature to a value between 0=‘cold’ up to 100=‘warm’. This is not going to help your configuration as it communicates via a generic MQTT topic.
You could define the item as a Number and use Setpoint in the sitemap; may not be very user friendly. Also a ‘proxy item’ could work, combined with a rule that converts values, or even a simple transformation of values.
It may be advisable to start creating predefined values (or ‘scenes’ as they are often called) to simplify the UI.
Thank you for your extensive reply. I appreciate it. I hoped a more ‘elegant’ solution would be available but unfortunately it seems that its not. I also thought about creating ‘scenes’ as an alternative but I wished there was a more elegant solution. Thanks!
Well, a simple (and therefor somewhat elegant?) way would be a transform. And by using a tiny JavaScript snippet to do a conversion from 0…100 to 153…500, you will loose some granularity, obviously, but otherwise it is as straightforward as a binding that has color temperature support built-in.
Looks like outgoing transformations on MQTT topics are only included in the latest snapshot releases of OH 2.5 as stated in this post. These are not recommended for ‘production’ use as the whole platform is being reworked at the moment.
So, I propose to wait for a 2.5.0.M2 relaese before implementing a JavaScript transform for this.
At least in the 2.5M1 build I use is quite stable it’s only the snapshots after that which are not recommended. You may not need a transformation as you can configure an absolute minimum and maximum in the properties of a mqtt thing dimmer channel in paper ui. These map to 0 and 100% of the dimmer channel. I use this for the CT channel of my shelly bulb which expects 3000 to 6500 and it works great.
Incase you want to use a transformation anyway. Install Javascript Transformation and save something like this:
(function(i) {
var input1 = parseInt(i, 10);
var input2 = input1 * 3.47;
var output = Math.round(input2) + 153;
return output;
})(input)
as a Javascript file in your transformation folder and call it as an outgoing transformation. But as I said in the post before that’s probably not necessary. This will only work under 2.5 and later when the outgoing transformations were added.
Aah thank you all for your answers. I’m still on 2.4 stable so it does not yet apply to me. Thank you for pointing out de javascript option. I’ll look into it. Thanks