home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
74.17k stars 31.14k forks source link

'meter_period' attribute not showing in REST API history response #126110

Closed gluoncompany closed 2 months ago

gluoncompany commented 2 months ago

The problem

Hello everyone,

I have two Home Assistant installations from which I am extracting data from the REST API using an external application. Recently, I noticed that in the second installation (which is more recent, with Core version 2024.9.1), the "meter_period" attribute is not displayed in the utility meters' entity attributes, whereas in the older installation, it always shows up.

Is this some kind of configuration error, or is it possible that this information is no longer shown in the new version?

Thank you very much in advance. KR, Jose A.

What version of Home Assistant Core has the issue?

core-2024.9.1

What was the last working version of Home Assistant Core?

core-2024.3.1

What type of installation are you running?

Home Assistant OS

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

#NOT SHOWING 'meter_period' attribute (HA installation - core v2024.9.1):
area_tecnica_diario:
  source: sensor.pinzas_area_tecnica_energy
  cycle: daily
  always_available: true
  unique_id: area_tecnica_diario

#SHOWING 'meter_period' attribute (another HA installation - core v2024.3.1):
enfriadora_diario:
  source: sensor.pinzas_enfriadora_energy
  cycle: daily
  always_available: true

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 2 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!

Code owner commands Code owners of `utility_meter` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign utility_meter` Removes the current integration label and assignees on the issue, add the integration domain after the command. - `@home-assistant add-label needs-more-information` Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue. - `@home-assistant remove-label needs-more-information` Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


utility_meter documentation utility_meter source (message by IssueLinks)

dgomes commented 2 months ago

That information is no longer available as an attribute since it's a static information. This change was done to optimize our recorder database that was repeatedly storing this information on every state change.

You can still find this information in the diagnostic of the integration.