Closed parautenbach closed 1 month 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)
This is related to https://github.com/home-assistant/core/pull/119761
Thanks! My search didn't find that. I've subscribed to that issue.
On my integrations page, there's also no UM integration listed. Perhaps this is related to the issue.
The Utility Meter integration is classified as a helper, so it is not shown on the integrations page, only in the “Helpers” tab.
@dougiteixeira only applies to utility_meters setup using config_entry
This is related to #119761
It is not proposed to bind YAML-created utility meter entities to the source entity device, as device bindings are only supported for configuration entries.
@dougiteixeira only applies to utility_meters setup using config_entry
No, entities created via YAML also appear in the "Helpers" tab.
One way around this is to return the attributes for entities created by YAML, but exclude those attributes from the recorder.
@dougiteixeira only applies to utility_meters setup using config_entry
No, entities created via YAML also appear in the "Helpers" tab.
They appear, but since they are not bound to a device you don't get to access the diagnostic button.
On the other hand the diagnostics are simply an dump of the configuration entry, if you create UM through YAML you can read the YAML itself, so you are not loosing anything.
One way around this is to return the attributes for entities created by YAML, but exclude those attributes from the recorder.
If makes no sense, they used to be attributes but got moved to diagnostics precisely because there was no point in keeping static values (come from configuration) as attributes that would spam the recorder.
I think we might need to close this issue as not supported :(
One way around this is to return the attributes for entities created by YAML, but exclude those attributes from the recorder.
If makes no sense, they used to be attributes but got moved to diagnostics precisely because there was no point in keeping static values (come from configuration) as attributes that would spam the recorder.
That's right, the main reason they were moved to diagnostics was to avoid recording. For entities via UI it makes perfect sense, but for YAML entities it removed the feature.
The ideal would be for entities to be linked to devices via YAML, but this requires an architectural change in Home Assistant that I think is difficult to make.
So it might be feasible to return the attributes and remove them from the recorder.
Firstly, I appreciate all the feedback.
The Utility Meter integration is classified as a helper, so it is not shown on the integrations page, only in the “Helpers” tab.
That is utterly confusing, as it simply creates sensors.
if you create UM through YAML you can read the YAML itself, so you are not loosing anything.
What's lost is the ability to display such values or to access it programmatically (via templates). For now it's the cron
attribute, but this could affect other really useful attributes in future when migrated.
If makes no sense, they used to be attributes but got moved to diagnostics precisely because there was no point in keeping static values (come from configuration) as attributes that would spam the recorder.
This is perhaps the strongest argument against having these as sensors – and I'd be happy with that outcome – but my point above needs to be kept in mind.
Was the blog updated? It seems the note about utility meters got removed (good, if that's the case).
Just a loose future thought (and I know this is not a feature request forum), a template function to get a config entry might be useful.
The problem
The
cron
attribute of utility meters recently got replaced with separate sensors.However, it seems that if one create a UM in YAML, there is no device page (not even if it has a unique ID).
I tried a number of permutations to see if there's a particular set of config fields that are problematic, but the behaviour was consistent in all cases.
One theory was that the diagnostic sensors will only exist when a tariff is defined. Another one (my theory) was that the
cron
field had to be used explicitly (and not implicitly via thecycle
field).See my test configs below, but I thought of hacking the URL to get to a device page, but my entities have no device ID associated, for example, this results in
None
:On my integrations page, there's also no UM integration listed. Perhaps this is related to the issue.
What version of Home Assistant Core has the issue?
core-2024.10.1
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant Core
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
Anything in the logs that might be useful for us?
No response
Additional information
No response