#mqtt esp8266 and dht 11
1 messages · Page 1 of 1 (latest)
Assuming you're sing mosquitto as a Home Assistant add-on, and you're publishing mqtt data from your esp8266 to that mosquitto instance, did you update configuration.yaml with the new information so home assistant has entities configured?
This is what @turbid arrow is talking about: https://www.home-assistant.io/integrations/sensor.mqtt/
Also you don't need to mask LAN IP addresses 😄 it's not a security risk
Example, possibly a poor one:
mqtt:
sensor:
- name: "MyUniqueEntityName"
state_topic: "state/MyTopic"
unit_of_measurement: '°F'
value_template: "{{ value_json.MyTempValueNameFromTheEspDevice }}"
unique_id: UniqueLongHexString
device_class: temperature
- name: "MyUniqueEntityName2"
state_topic: "state/MyTopic"
unit_of_measurement: '%'
value_template: "{{ value_json.MyHumidityValueNameFromTheEspDevice }}"
unique_id: UniqueLongHexString2
device_class: humidity
or you can also publish a configuration of entities . To do that, you need to use: MQTT Discovery: https://rc.home-assistant.io/integrations/mqtt/#mqtt-discovery
Do you consider to use ESPHome? his will make life easier for you, such as uploading changes over Wi-Fi and tight HA and ESP integration. And at the same time, you can still write C++ code as a custom component if needed.
so my trail was to code the esp in arduino ide and then went for mqtt auto discovery in HA