External sensor via MQTT data stream to HA entity or

Hi,

Got HA OS via RPi installed and running a stream of data via MQTT broker (Ubuntu machine with RPi Zero 2 W as data collector).

I can easily get the values from the Ubuntu Machine (broker) using Node-RED into HA. HA now reads the data in Node-RED, but how do make this data stream like a standard “entity” so that I can further manupulate it in HA (i.e. send it to my existing Home Assistaint/Google Assistant integration or use in an automation)?

thanks

I think the MQTT sensor entity is what you are looking for:

thanks @mk-maddin

after placing this in the configuration.yaml and restarting

# MQTT Sensor import
  - platform: mqtt
    state_topic: "solar/regulator/input_voltage/state"

I obtain these errors in the log:

Unable to prepare setup for platform mqtt.sensor: Unable to set up component.
2:07:58 PM – (ERROR) setup.py
Setup failed for mqtt: Integration failed to initialize.
2:07:57 PM – (ERROR) setup.py

Node-RED is reporting (and working) at that topic, here’s a snapshot:

Any idea why this error is apperating?

Have you configured the MQTT integration already?
Based on the error message I would say you try to setup the sensor without integration

1 Like

thank you, that solved it!

Cheers