Closed RaZz85 closed 3 months ago
Hey there @dcsbl, mind taking a look at this issue as it has been labeled with an integration (homewizard
) you are listed as a code owner for? Thanks!
(message by CodeOwnersMention)
homewizard documentation homewizard source (message by IssueLinks)
which sensor exactly do you mean? please provide the state details of this entity from the developer tools states tab, thx :+1:
Hi,
As found in the documentation for Homewizard (https://www.home-assistant.io/integrations/homewizard/), it's the sensors detailed in "Peak demand". On my instance the entity received the name "sensor.p1_meter_3c39e7253554_piekverbruik_huidige_maand": unit_of_measurement: W device_class: power friendly_name: P1 meter (3c39e7253554) Piekverbruik huidige maand
I've checked the code and this would be the sensor "monthly_power_peak_w", which I think would require a line " state_class=SensorStateClass.MEASUREMENT,". How ever, I'm not certain how to test this myself to submit a PR, and I don't want to merge untested code...
OK, this is by design - see available state classes on our developer docs
The state represents a measurement in present time, not a historical aggregation such as statistics or a prediction of the future.
reference: https://github.com/home-assistant/core/pull/85198#discussion_r1070642228 and https://github.com/home-assistant/core/pull/85198#discussion_r1070642239
Ah. That's unfortunate. I'll have to figure out a different way of storing these for a year, since the invoice period is calculated over a full year, and the standard recorder period sadly makes this entity less useful than it could be. Thank you very much for checking, though!
Close.issue
The problem
The peak demand sensor for HomeWizard seems to be missing the state_class attribute. Since this value is used by the energy supplier to calculate the yearly invoice, most users will want tot keep this data longer than the default recorder setting, and even longer than a year to be able to monitor the evolution. To do this, the entity will need the attribute added: state_class: measurement
What version of Home Assistant Core has the issue?
core-2024.7.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
Homewizard
Link to integration documentation on our website
https://www.home-assistant.io/integrations/homewizard/
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