Tutorial: Publishing an MQTT Discovery Payload That Reaches the Energy Dashboard
One retained JSON message on the right topic creates an entity in Home Assistant. Three fields inside it decide whether that entity can also be picked as an energy source – and none of the three reports an error when it is wrong.



