Hi,
i have a DAC, that is connected to a Raspberry PI (not running HA). This DAC shall be used to generate 0-10V to set Smart Grid functionality in my Hoval heat pump. I created a python script, that connects to my mqtt server and creates a mqtt number entity using mqtt autodiscovery.
I can control the voltage from HA, but whenever the voltage is set from the python script, the number entity does not get a update. Do i need a extra sensor?
Mqtt messages look like these:
# mosquitto_sub -h xxxxxxxxx -v -t 'homeassistant/number/#'
homeassistant/number/pi4-gp8403-0/config {"unique_id": "pi4-gp8403-0", "device_class": "voltage", "name": "Volt", "state_topic": "homeassistant/number/pi4-gp8403-0/state", "command_topic": "homeassistant/number/pi4-gp8403-0/set", "command_template": "{\"voltage\": {{ value }} }", "unit_of_measurement": "V", "icon": "mdi:flash", "min": 0.0, "max": 10.0, "step": 0.01, "value_template": "{\"voltage\": {{ value }} }", "availability": {"payload_available": "on", "payload_not_available": "off", "topic": "homeassistant/number/pi4-gp8403-0/availability"}}
homeassistant/number/pi4-gp8403-0/availability on
homeassistant/number/pi4-gp8403-0/state {"voltage": 0.0}
homeassistant/number/pi4-gp8403-0/set {"voltage": 0.01 }
homeassistant/number/pi4-gp8403-0/state {"voltage": 0.01}
“set” messages are from HA, and “state” messages are from python. HA ignores them afaik.