I read my smart P1 energy meter with a Raspberry Pi (using https://github.com/freekvh/dsmr-mqtt-wrapper) and send the data to HA using MQTT.
I tried to add the data to the new dashboard but the entities did not show up. I clicked the helpfully provided “Why is my entity not in this list”-link and indeed, I didn’t set the required attributes in my configuration. But now I have and they still don’t show up, this is my configuration for the energy sensors:
sensor: - platform: mqtt name: "Current usage" state_topic: "home/smart_meter/CURRENT_ELECTRICITY_USAGE" unit_of_measurement: 'kW' device_class: 'power' state_class: 'measurement' - platform: mqtt name: "Electricity used" state_topic: "home/smart_meter/ELECTRICITY_USED_TARIFF_ALL" unit_of_measurement: 'kWh' state_class: 'measurement' device_class: 'energy' - platform: mqtt name: "Gas consumed" state_topic: "home/smart_meter/HOURLY_GAS_METER_READING" unit_of_measurement: 'm3' state_class: 'measurement'
What am I missing?
Edit, If I set
I get the error:
[last_reset] is an invalid option for [sensor.mqtt]
If I use (no string):
I get this error:
Invalid config for [sensor.mqtt]: Single-level wildcard must occupy an entire level of the filter for dictionary value @ data['last_reset_topic']. Got datetime.datetime(1970, 1, 1, 0, 0, tzinfo=datetime.timezone.utc). (See /config/configuration.yaml, line 32). Please check the docs at https://www.home-assistant.io/integrations/mqtt