Display Node-Red values in HA frontend

Hi,
I would like to display a Node-Red value in HA frontend.
But I can’t get it to work, I have done following.
Node-Red:
image

HA
configuration.yaml:

 - platform: template
    sensors:
      # sensor for smooth cloudiness
      smooth_cloudiness:
        friendly_name: "Smooth Cloudiness"
        unit_of_measurement: '%'
        value_template: "{{ state_attr('sensor.smooth_cloudiness', 'cloudiness') }}"

Get no value

What are I doing wrong?

Hi Fredrik,

I use MQTT as transport layer for a lot of my devices. All Z-Wave Devices are connected via zwave2mqtt and also my Arduino based sensors are using mqtt.

Therefore I also use MQTT to get NodeRed values back to HA.

To do this I define mqtt sensors in HA and use the mqtt block in NodeRed to send the values.
This of course needs a running mqtt server wich in my opinion is always a good option in a HA installation (see above)

chris_ka I have a MQTT addon installed in Hassio,
image
But I don’t have it working and maybe not configured.
Where do I start?
Under “Configuration” >> “Integrations” in the UI I have following
image
But there is no devices


Do I need to add something in configuration.yaml ?

as an alternative to mqtt, you can use entity node to create a sensor in home assistant. you need to install also node-red custom integration from HACS.

it looks like you have the mosquito broker already running. The config is in Supervisor -> Dashboard
There you should find the Add-on “Mosquitto broker”. Click there and scroll down to config.
Her you can setup the broker

Please give me the nane of the node I shall install?
I didn’t found the addon!

The node is called “mqtt out” you find it in the network section

when you open the node you see this window

first create a server entry with the config of the Mosquitto broker. Basically you need to enter the IP address of your broker (it is most likely the same IP address as your HA system) and the port 1883
then choose a topic and a name.

To get the sensor in HA just define a mqtt sensor like this

  - platform: mqtt
    name: "Erzeugung aktuell"
    state_topic: "sma/3/4"
    device_class: "power"
    unit_of_measurement: "W"

note that the topic must match. That’s all

Oh you are asking which nodered installation to use?
use the official one from the ADD-ON Store in Hassio

the first one in the last row

you need this one so sensor node can work.

Okay, I need to configure my MQTT database first.
I would like the MQTT database to be located on a separete usb HD.
Is that possible ?