First time I’ve used a MAP on a channel value and it doesn’t work.
I couldn’t seem to find i docs how you set it, but it seemed like this?
transformationPatternOut: MAP:weather.map
This is the setup;
UID: mqtt:topic:mqtt_broker:nspanel
label: NS Panel
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:mqtt_broker
location: Lower Hall
channels:
- id: ns_temperature
channelTypeUID: mqtt:string
label: NS Temperature
description: ""
configuration:
formatBeforePublish: '{"temperature":%s,"humidity":0,"tempUnit":0}'
commandTopic: cmnd/nspanel/nspsend
- id: ns_outdoor_temp
channelTypeUID: mqtt:string
label: NS Outdoor Temperature
description: ""
configuration: {}
- id: ns_weather
channelTypeUID: mqtt:string
label: NS Weather
description: ""
configuration:
transformationPatternOut: MAP:weather.map
formatBeforePublish: '{"HMI_weather":%s}'
commandTopic: cmnd/nspanel/nspsend
- id: ns_switch_2
channelTypeUID: mqtt:switch
label: NS Panel Switch 2
description: ""
configuration:
stateTopic: stat/nspanel/POWER2
the one in question is ns_weather
I’m trying to use the map file for it. In conf/transform
I’ve a file called weather.map, set up like this…
741=11
751=11
761=11
762=11
771=11
781=11
800=1
801=2
802=2
803=2
804=7
When I set it to 803, I was hoping to see “2” in the mqtt event, but it has “803”
23:17:36.109 NSP: Sent = {"HMI_weather":803}
How does the map work?