You’ve not defined the unit metadata. Since you are commanding it with 50 I assume you want a percent? Unfortunately percent is not the default unit for Number:Dimensionless. one is the default unit.
0.5 one == 50 %
Because you are commanding with 50, 50 one == 500 % which is obviously nonsense.
You can:
set the unit metadata on the Item to be %
command the Item with 0.5 as @Oliver2 suggests which keeps you using unit one
command the Item with the String "50 %" which tells OH what unit you are using for this command
I recommend both 1 and 3. 1 because when you chart this Item you’ll likely want it to show values between 100 and 0, not 1.0 and 0. 3 because it’s always better to explicetly show in your code what you mean.
sorry, but didn’t work
i tried
TerrasseLEDStreifenSaturation.sendCommand(“50 %”)
TerrasseLEDStreifenSaturation.sendCommand(0.5)
TerrasseLEDStreifenSaturation.sendCommand(“0.5 one”)
I think you have a different problem and probably need to add more explanation. I’m seeing this
which makes me think this is a light. and this
which makes me think you need two parameter.
So I’m not knowledgable beyond that except to say you need two parameters (or more).
From my AI assistant; In response to What parameter for a light goes with saturation? The context of lighting and color, saturation is often paired with hue and brightness (or intensity ). These three parameters together define a color in various color models, such as HSB (Hue, Saturation, Brightness) or HSL (Hue, Saturation, Lightness).
val sat = TerrasseLEDStreifenSaturation.state
logInfo("test","sat: " + sat.toString)
TerrasseLEDStreifenSaturation.sendCommand(sat)
i got
2024-08-18 03:09:08.676 [INFO ] [org.openhab.core.model.script.test ] - sat: 0.95
2024-08-18 03:09:08.679 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'test-1' failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.BusEvent.sendCommand(org.openhab.core.items.Item,java.lang.String) on instance: null in test
when i have a look at openhab, items i see 0.95, but i can’t do a
failed.
is this maybe a real openhab problem - because of in rest data i see definitely ‘0.95’ as item state?
what i see too in the rest data is
“readOnly”: true,
is this the problem? and if yes how can i solve this?
Are you sure you have the correct Item type? It seems odd that saturation would be a separate Channel. Usually stuff to do with Color are combined into a Color Item.
And even as a separate Channel, I’d expect it to require a Dimmer Item.
Ultimately, the error is comming from Homematic. So the problem is either you’ve misconfigured something in the Thing, the Item type isn’t right, or there is a bug in the binding.I don’t see the word “saturation” anywhere on the Homeatic binding’s readmen so .
there are really 3 separate channels for dimmerlevel,hue and saturation.
level and hue are working, saturation i can read a valid number but can’t write this number back. the items are linked by a click.
can i have any possibilities to get the editable value to yes? or is this coming out of the binding? whome/where can i ask for help with the binding?
That just means you are using a .items file. When you use a .items file you cannot edit the Item in the UI. It has nothing to do with any problem you are seeing here.
If you want to edit it in the UI you cannot use .items files.
You can post an issue to the openhab-add-ons repo.
ok. seems to be an issue in the homematic ccu.
but as a workarround one can use the combined parameter instead of saturation, hue and brightness explicitely