I am having a hard time inputting my sauna controller json commands into HA. Any easier way to do this?
[SAUNA.ino]
(HarviaWiFi/SAUNA.ino at d40ca850474f663d39eeffa7981f63035e9ce88a · SwiCago/HarviaWiFi · GitHub)
I am having a hard time inputting my sauna controller json commands into HA. Any easier way to do this?
[SAUNA.ino]
(HarviaWiFi/SAUNA.ino at d40ca850474f663d39eeffa7981f63035e9ce88a · SwiCago/HarviaWiFi · GitHub)
Have you got some examples of the mqtt published.
This is the info published to sonoff/sauna:
‘{
“celcius”: 19,
“fahrenheit”: 66.2,
“state”: 0,
“active”: 0,
“setpoint”: 100,
“autooff”: 0
}’
And this is the message published by sonoff/sauna/set:
‘{
“state”: true
}’
Power ($.state), Active ($.active), Temp Celcius ($.celcius), Temp Fahrenheit ($.fahrenheit), and AutoOff ($.autooff) all subscribe to sonoff/sauna and extract from JSON path with $.value format (i.e. $.value).
Power and Active are set as buttons on MQTT Dash with ‘enablepub’: ‘false’. Temps and AutoOff are text tiles with ‘enablepub’: ‘false’.
SetPoint is a multi-choice tile with options ranging from 60 to 110 (degrees F) in format ({“setpoint”:65}) labeled 65. SetPoint is subscribed to sonoff/sauna and publishes to sonoff/sauna/ set.
I have gotten the On/Off button, Temp fahrenheit and AutoOff to work by inserting this into yaml:
'switch:
sensor:
platform: mqtt
unique_id: sauna_temp_f
name: ‘Fahrenheit’
state_topic: ‘sonoff/sauna’
qos: 0
value_template: ‘{{value_json.fahrenheit}}’
unit_of_measurement: ‘°F’
platform: mqtt
unique_id: sauna_autooff
name: ‘AutoOff’
state_topic: ‘sonoff/sauna’
qos: 0
value_template: ‘{{value_json.autooff}}’
unit_of_measurement: ‘m’’
Stangely, Celsius ‘{{value_json.celciust}}’ outputs Fahrenheit value with " unit_of_measurement: ‘°F’ ", and Active/Power:
'switch
Does not update when ‘On/Off’ changes state (I figure it has to do with the ‘command_topic’ HA requires for ‘switch’ since it has no ‘enablepub’ option.
Please please read this and quote your code properly How to help us help you - or How to ask a good question