dawidchyrzynski / arduino-home-assistant

ArduinoHA allows to integrate an Arduino/ESP based device with Home Assistant using MQTT.
https://dawidchyrzynski.github.io/arduino-home-assistant/
GNU Affero General Public License v3.0
463 stars 112 forks source link

Load SensorData from JSON File. #252

Open Andy200877 opened 1 month ago

Andy200877 commented 1 month ago

Hello... I have multiple DS18B20 Sensors connected to a NodeMCU and want to publish ist to HA.

But my Code do not work. The uid and the name from the sensor ist loaded from my json file. But when i use ist for arduinoHA the UID and Name for the Sensor is under HA empty.

Arduino Code https://[pastebin.com/raw/KtVrU6qX](https://pastebin.com/raw/KtVrU6qX)

Serial-Log ID: 28:71:dd:32:0:0:0:4c, Bezeichnung: Sensor1, Temperatur: 19.56 , Offset: 1.10, Temperatur ber.: 20.66 HASensorNumber Name: Sensor1 ID: 28:a7:e4:30:0:0:0:4a, Bezeichnung: Sensor2, Temperatur: 19.50 , Offset: -1.10, Temperatur ber.: 18.40 HASensorNumber Name: Sensor2

sensor_data.json {"28:71:dd:32:0:0:0:4c":{"description":"Sensor1","offset":1.1},"28:a7:e4:30:0:0:0:4a":{"description":"Sensor2","offset":-1.1}}

Can someone help me ?