Closed fightforlife closed 3 years ago
You put the valueMap
on the state, not the command. Its still a bidirectional solution, its just the configuration for it is always on the state because its essentially a "state transformation".
Thank you very much! Wokring perfectly now. For anyone finding this as a reference:
Attributes
{
"commandOnlyOnOff": false,
"queryOnlyOnOff": false
}
Commands
{
"action.devices.commands.OnOff": {
"on": "tasmota/gateway/cmnd/Backlog"
}
}
State
{
"on": {
"topic": "tasmota/gateway/cmnd/Backlog",
"valueMap": [
{
"google": "true",
"mqtt": "smartRCsend 1131857,24,1,15,300; Delay 1;",
"type": "value"
},
{
"google": "false",
"mqtt": "smartRCsend 1131860,24,1,15,300; Delay 1;",
"type": "value"
}
]
}
}
Hi i8beef,
I am currently trying to use the valueMap for a simple onOff command. But it is not working for me. Most likely it is just a typing error somewhere but I cannot find it.
Do you have to change the way you use the valueMap for commands rahter than states?
Error: Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: {. Path '['action.devices.commands.OnOff'].on', line 3, position 11.
Thanks in advance!