Hi,
I’m trying to setup an esp8266 to auto discover and publish via Mqtt. I followed the examples found here: https://www.home-assistant.io/docs/mqtt/discovery/
but when I publish the configuration message:
{“device_class”:“sensor”,“name”:“Temperature”,“state_topic”:"/homeassistant/sensor/blablablastate",“unit_of_measurement”:“°C”,“value_template”:"{{ value_json.temperature }}"}
with topic:
/homeassistant/sensor/blablablaT/config
I get this error in HA log:
2019-01-20 09:04:08 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File “/usr/lib/python3.5/asyncio/tasks.py”, line 239, in _step
result = coro.send(None)
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/components/sensor/mqtt.py”, line 69, in async_discover_sensor
config = PLATFORM_SCHEMA(discovery_payload)
File “/srv/homeassistant/lib/python3.5/site-packages/voluptuous/schema_builder.py”, line 267, in call
return self._compiled([], data)
File “/srv/homeassistant/lib/python3.5/site-packages/voluptuous/schema_builder.py”, line 589, in validate_dict
return base_validate(path, iteritems(data), out)
File “/srv/homeassistant/lib/python3.5/site-packages/voluptuous/schema_builder.py”, line 427, in validate_mapping
raise er.MultipleInvalid(errors)
voluptuous.error.MultipleInvalid: value is not allowed for dictionary value @ data[‘device_class’]
what I’m doing wrong?
thanx in advance