Hi all,
I am totally new to HA.
HA is running on Docker on a server.
I have a raspberry connected to my network and a sensor is connected to this raspberry.
I do some calculations with the sensor values and put the value with a time stamp into a logfile.
Now I want to use the latest entry and give it as entity to HA and want to see it on the Dashboard.
What is the best way to hand over the latest value to HA?
I created a MQTT broker on the server.
Added in my Python script a MQTT push.
See in HA integration MQTT see the messages from the raspberry, if I click on starting listening.
I tried to add a sensor to configuration.yaml like in the tutorials and documentation:
Logger: homeassistant.config
Source: config.py:501
First occurred: 17:20:25 (1 occurrences)
Last logged: 17:20:25
Invalid config for [mqtt]: [-sensor] is an invalid option for [mqtt]. Check: mqtt->mqtt->0->-sensor. (See /config/configuration.yaml, line 13). Please check the docs at MQTT - Home Assistant
Line
13: mqtt:
14: -sensor:
15: state_topic: “oeltank/tankinhalt”
now its working with this config:
mqtt:
sensor:
name: “Oeltank Tankinhalt”
unique_id: “oeltank/tankinhalt”
state_topic: “oeltank/tankinhalt”
unit_of_measurement: “Liter”
Very strange…
I think I fucked up some lines and spaces.
I am not sure why there were so many issues.
Now it seems working. Thanks for the help