Closed jyavenard closed 11 months ago
Hey there @dgomes, mind taking a look at this issue as it has been labeled with an integration (utility_meter
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
utility_meter documentation utility_meter source (message by IssueLinks)
I also have this.
I have an existing entry
source: sensor.grid_import_energy
name: Daily Import Meter
cycle: daily
tariffs:
- offpeak
- shoulder
- peak
- superoffpeak
I recently added the superoffpeak tariff and it is created OK but doens't have the unit of kWh, so can't be added to energy dashboard.
I recently added the superoffpeak tariff and it is created OK but doens't have the unit of kWh, so can't be added to energy dashboard.
when used with tariff it works just fine, this isn't the same bug as I listed above. However, you need to let the system populate the new entity, it won't have a unit until then
when used with tariff it works just fine, this isn't the same bug as I listed above. However, you need to let the system populate the new entity, it won't have a unit until then
Maybe not exactly the same but seems somewhat related with both unit_of_measurement
and device_class
not appearing in newly created entities. of the four tariffs I listed above, the first three which were existing are working fine. The 4th one which I recently added is not working as expected.
Mine have been created now for over 24 hours, and have accumulated energy.
Hi,
I have more or less the same issue and perhaps even stranger. I have one source sensor for the watts, which I use in an integration to give me the kWh. After that I use the Utility Meter integration on 4 levels: hourly, daily, monthly and yearly cycle. The monthly and yearly give device_class: energy and unit_of_measurement: 'kWh', exactly as expected. The other 2, hourly and daily don't do that. The numeric value though is correct for all of them..
state_class: total_increasing
source: sensor.cum_kwh_heat_pump
status: collecting
last_period: 0
last_valid_state: 0.040
meter_period: monthly
cron pattern: 0 0 1 * *
last_reset: 2023-07-05T21:46:05.274063+00:00
unit_of_measurement: kWh
device_class: energy
icon: mdi:counter
friendly_name: kWh Heat Pump MTD
vs
state_class: total_increasing
source: sensor.cum_kwh_heat_pump
status: collecting
last_period: 0
last_valid_state: 0.040
meter_period: daily
cron pattern: 0 0 * * *
last_reset: 2023-07-07T23:00:00.046418+00:00
icon: mdi:flash
friendly_name: Heat Pump Energy
I have multiple set-ups for other 'consumers' working flawlessly. I can't find any typo's, I have searched and searched, modified and tried but so far no results.. I have no clue.
Hi,
I have more or less the same issue and perhaps even stranger. I have one source sensor for the watts, which I use in an integration to give me the kWh. After that I use the Utility Meter integration on 4 levels: hourly, daily, monthly and yearly cycle. The monthly and yearly give device_class: energy and unit_of_measurement: 'kWh', exactly as expected. The other 2, hourly and daily don't do that. The numeric value though is correct for all of them..
state_class: total_increasing source: sensor.cum_kwh_heat_pump status: collecting last_period: 0 last_valid_state: 0.040 meter_period: monthly cron pattern: 0 0 1 * * last_reset: 2023-07-05T21:46:05.274063+00:00 unit_of_measurement: kWh device_class: energy icon: mdi:counter friendly_name: kWh Heat Pump MTD
vs
state_class: total_increasing source: sensor.cum_kwh_heat_pump status: collecting last_period: 0 last_valid_state: 0.040 meter_period: daily cron pattern: 0 0 * * * last_reset: 2023-07-07T23:00:00.046418+00:00 icon: mdi:flash friendly_name: Heat Pump Energy
I have multiple set-ups for other 'consumers' working flawlessly. I can't find any typo's, I have searched and searched, modified and tried but so far no results.. I have no clue.
This is the same issue I found (all coming from one energy sensor), it can only be a bug. You can add the device class and unit in customise.yaml just note that you'll also need to hit the fix issue button in you developer > statistics area after a reboot to correct the mismatching units.
if I create it with a certain name it gives me the unit of measurement as I change the name it disappears and in any case the problem is with daily
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
The problem
When creating a utility_meter to account for tariffs, such as:
three entities will be created:
select.daily_purchased_energy
sensor.daily_purchased_energy_peak
sensor.daily_purchased_energy_offpeak
and we can see that both the peak and offpeak entities carry the attributes from the source sensor:
sensor.eagle_200_total_meter_energy_delivered
and
sensor.daily_purchased_energy_peak
:in particular,
unit_of_measurement
,device_class
andstate_class
are carried across.However, if you define a simple
utility_meter
for measuring daily values:the created sensor
sensor.daily_exported_energy
will not carried the attribute across:unit_of_measurement
,device_class
aren't passed to the generated sensors.This is inconsistent.
It should carry the attributes from the original source sensor even if no tariffs are defined.
What version of Home Assistant Core has the issue?
core-2023.5.4
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
utility_meter
Link to integration documentation on our website
https://www.home-assistant.io/integrations/utility_meter/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
No response