Value of MQTT sensor doesn't active in grafic

Dear Collegues,

Could You advise with folow situation, please?

  1. I have integrated by MQTT electrical measuring parameters. The configuration.yaml add follow (see screen)
  2. In HA on the dachboard history grapfic and value are missing (see screen)
  3. In the same moment i can see that MQTT sensors are active (see screen)

What do I wrong?

Your sensors need a unit_of_measurement to display numeric graphs.

If you add a state_class they will also store long term statistics.

A device_class is useful too.

Dear Tom,

Thank You for advice. I am just starting work with HA and i can’t easy write code in yaml. Can i ask for You write, please, here additional what You mean

mqtt:

  • sensor:
    name: “HNPM_U1”
    state_topic: “#”
    value_template: “{{ value_json.U1 }}”

…i tried do it (see screen)


but systems is fault information (see screen)

Am i wrong?

  device_class: voltage
  state_class: measurement
  unit_of_measurement: "V"

The list of valid device classes is here: Sensor - Home Assistant

Tom, thank You!!! I will try do it. I will inform You about result.

…Tom, thank You very much!!! It’s work! :handshake: