Apologies if this is not posted in the right section as I’m new to all of this.
I am trying to display the value of a temperature sensor using io.adafruit.com as my MQTT broker, but the value always reads “unknown”. As far as I can tell, HA is connecting with the MQTT broker properly since I can publish to the broker successfully, but I can’t get the sensor to display the value to a topic that I’m subscribed to.
Configuration is as follows:
mqtt:
broker: io.adafruit.com
port: 1883
username: (username removed)
password: (password removed)
sensor:
- platform: mqtt
state_topic: "schong∕feeds∕temperature"
name: "Temperature"
unit_of_measurement: "°F"
# value_template: "{{ float(value_json.temperature) }}"
Have tried with both the last line commented out and uncommented out and with and without conversion to a float. Have also tried the last line as just:
value_template: "{{ float(value) }}"
Sending the following using the MQTT publish service from within HA seems to update the MQTT broker, so I believe HA is connecting properly:
{"topic": "schong/feeds/temperature", "payload": 84, "qos": 1, "retain": true}
I do see the following in the HA logs:
2017-08-19 13:05:14 INFO (Thread-2) [homeassistant.components.mqtt] Successfully reconnected to the MQTT server
But, I don’t see any indication that HA is getting sensor updates even though I believe I have logging turned up enough:
logger:
default: warning
logs:
homeassistant.components.mqtt: debug
Any insight would be greatly appreciated.