I want to add one of my sensors that comes into NodeRed (I publish its data to a MQTT topic) onto a HA dashboard.
configuration.yaml includes the following:
sensor:
- platform: mqtt
name: "GenBatt"
state_topic: "myenergi/zappi/power"
unit_of_measurement: "W"
value_template: "{{ value_json['0_genbatt'] }}"
Reading on the web, I should be able to see this entity under Development Tools > States. It isn’t there. I’m assuming once it appears there, then the rest should be straight forward to add to a dashboard.
I’ve used the Developer Tools > Template utility to test my Json payload and that works.
{%
set my_test_json =
{
"0_power":-5,"0_zappi":0,"0_genbatt":371,"0_house":365
}
%}
The energy is {{ my_test_json['0_genbatt'] }}
The energy is 371
What am I missing? No errors being reported on HA - so believe the config file is correct.
Thank you!