Closed yodapotatofly closed 1 year ago
This error is a bug. It should appear only at HA initialization. HA try to get some entity data despite data are not available yet.
However, this error is not related to the fact that your gas_energy is not displayed. Your entity data should be recorded with the recorder module and also ensure you have at least the following attributes;
state_class: total_increasing
unit_of_measurement: kWh
device_class: energy
icon: mdi:fire
friendly_name: gas_energy
I am still on HA version 2022.5.5.
On my setup, I have the same kind of issue as your have. I don't manage to show gas_volume entity.
the sensors are defined exactly as in the readme :
template:
- sensor:
- name: gas_volume
unit_of_measurement: "m³"
state: >
{{ state_attr('sensor.gazpar', 'daily')[0]['end_index_m3'] | float(0) }}
icon: mdi:fire
device_class: gas
state_class: total_increasing
- name: gas_energy
unit_of_measurement: "kWh"
state: >
{{ states('sensor.gazpar') | float(0) }}
icon: mdi:fire
device_class: energy
state_class: total_increasing
So you're saying that on your end, you only have gas_energy and not gas_volume ?
I also tried inverting the two sensors order in the yaml, with no success
Ok, I guess I found the issue : to appear in the "gas" energy dashboard, device_class needs to be... 🥁🥁🥁 "gas" !
I have just upgraded to HA 2022.11.4, and now sensor.gas_energy does not show up in gas section, but it is visible in electricity section.
I guess you're right. Now :
Yes, I can confirm that with gas in works properly. I'll let you correct the readme and close the issue ?
In fact, it is identified as a regression in HA 2022.11.
See : https://github.com/home-assistant/frontend/issues/14292
This issue appears to be fixed in the 2022.12 beta release.
Only gas_volume is available in gaz energy dashboard
Logs shows :