(SOLVED) NEED HELP Rules Error in Openhab 2

2020-04-02 18:52:00.528 [WARN ] [rthome.model.script.actions.BusEvent] - Cannot convert ‘60’ to a command type which item ‘Jaluzea1’ accepts: [OnOffType, RefreshType].

Sitemap :
Switch item=JaluzeaStanga mappings=[0=“Open”, 40=“Half”, 60=“Close”]

Rule :

//Set Blinds to close
rule “Blinds close”
Time cron “0 54 18 1/1 * ? *”
sendCommand(Jaluzea1, 60)

Hi Bardutlonut,

You are sending a string as command so you should enclose it with quotation marks like this “60”.

To keep the code readable it’s easier to use the Preformatted text enclose your code in ``.


Seems clear enough.
You haven’t said the important part, but we can guess your Item Jaluzea1 is a Switch type Item.
Like it says, you can command it ON or OFF, but not command it with a number.
Perhaps you meant your Item to be a Number type Item.

You can use a Switch widget in your sitemap to control a Number type Item (or a String type etc.) providing your commands are something sensible for that type.


//Blinds Controls

Dimmer JaluzeaStanga “Jaluzea Stanga [%s]” [ “Lighting” ] {mqtt=">[broker:SmartHome/Power/Jaluzea1:command:*:default],<[broker:SmartHome/Power/Jaluzea1/state:state:default]", autoupdate"false"}

În joi, 2 apr. 2020 la 19:30, Rossko57 via openHAB Community bot@community.openhab.org a scris:

not working with quotation marks…

this is what i fallow:

not working whit quotation marks…

În joi, 2 apr. 2020 la 20:09, Ionut Valentin Bardut bardutionut@gmail.com a scris:

All its working ok ,but not the rule... Im not good whit programing,what i need to change ?

What type of Item is that?

this means BLINDS in my language

What type of openHAB Item is Jaluzea1, in its definition?
JaluzeaStanga (which you showed us an Item definition for) is not the same Item as Jaluzea1 (which is giving you the error message)

Thx ,i will modify thet,s hope this is the problem.

Thx again.

All OK,new it`s working.Thx.