Hi
I have a defined item which is a String. To this string I send commands to switch on/off the aircon and these are Infrared codes with an RM Broadlink device.
My question is within the transform map with these codes, is each line unique? The reason I ask is many codes are defined to turn devices on and off, but Ive prefixed the code with the device name/function assuming I cant just use ON=RAW CODE
I would have many ON codes for various devices. What this means is that the item state shows AirconOn instead of ON
My intention is to actually use the state of the item in a check, whilst I know state cant be checked like a light its enough for me to tell me if the device is on or off or at least if the last command was ON/OFF
Here is what I see for my item
item:
String Aircon "Aircon" { channel="broadlink:rm3:78-0f-77-5a-cb-fa:command" }
smarthome:status Aircon
AirconOn
openhab>
Transform:
/* LG Aircon Controls*/
AirconOn=260040000001178b133513111311131113351311131113111311131113111311131113111311131113111311133513351311131113351311131113351311133414000d050000000000000000
AirconOff=260040000001178b133513111311131113331511131113111335133513111311131113111311131113111311131113111311133513111335131113111311133513000d050000000000000000
Would this be valid?
/* LG Aircon Controls*/
AirconOn=ON
AirconOff=OFF
AirconOn=260040000001178b133513111311131113351311131113111311131113111311131113111311131113111311133513351311131113351311131113351311133414000d050000000000000000
AirconOff=260040000001178b133513111311131113331511131113111335133513111311131113111311131113111311131113111311133513111335131113111311133513000d050000000000000000
How can I display this as just ON or OFF, without the AirconOn/AirconOff knowing I have many devices that use ON/OFF
Thanks!