kevin
(kevin)
January 12, 2020, 2:25am
1
I’m transitioning my MQTT items from the old V1 binding to the new V2 binding. I use the Tasmota HOLD function where it sends the text “HOLD” to the switches topic if the switch is held on. With the V1 binding I had this syntax which worked but I’m not sure how to get it to work with MQTT2
{mqtt="<[control:cmnd/MyLightSwitch/POWER2:command:ON:HOLD]",autoupdate="false"}
Adding a thing with this topic and putting ‘HOLD’ in the Custom On/Open Value puts this in the log
Command 'HOLD' not supported by type 'OnOffValue': No enum constant org.eclipse.smarthome.core.library.types.OnOffType.HOLD
H102
(CM6.5 H102)
January 12, 2020, 2:57pm
2
Did you create the Thing in PaperUI or files?
If using files maybe try a MAP transformation, a rule or lable the item as a string?
kevin
(kevin)
January 12, 2020, 7:18pm
3
I used PaperUI so far although I’m considering switching to text based as it’s taking a long time. I’ll experiment with strings
kevin
(kevin)
January 13, 2020, 3:26am
4
I’ve now swapped to using a things file and it works if I define it as this
Type switch : LWT "LWT" [ stateTopic="tele/PrintScanSOnOff/LWT", on="Offline", off="Online" ]
Anyone following on note the use of LOWERCASE state names rather than the usual upper case, that took a long time to work out…