Can someone provide a link showing a COMPLETE, WORKING configuration.yaml using an MQTT energy sensor?
The HA documentation is incomplete and not current to HAOS 12.3. My expectation in the blog docs is to be able to cut and paste from the provided yaml samples to get something working. The reality is it just doesn’t work as posted due to formatting, changes in HAOS, whatever…
What EXACTLY does HAOS expect and require from to be able to display data from an MQTT sensor in the “ENERGY” → " Electricity grid" → “Grid Consumption”
The following is an example of what DOES NOT WORK and I have many more non-working variations just like it
mqtt:
- sensor:
name: "HOUSE_kWh_hourly"
unique_id: "sensor.HOUSE_kWh_hourly"
value_template: "{{ value_json['kWh'].kwh | round(2) }}"
state_topic: "homeassistant/sensor/HOUSE_kWh_hourly/status"
unit_of_measurement: 'kwh'
device_class: energy
state_class: total_increasing
icon: mdi:LightningBolt
force_update: true