latest version has fixed it for me @11harveyj - any chance you could enable adding a fixed price to the integration? at the moment it will only track the consumption but with a fixed price being added onc could get an estimate without sewage and standing cost into the dashboard
Awesome. I think I might be able to do something, although I donāt think the API returns much pricing data (at least on my account, I only seem to get the estimated total in May).
I dont think the API provides it but if you configure the energy dashboard at the moment the two bottom options arent available which I think may be an entity definition missing or so
the very last one would allow you to set a fixed price
Yes, the data for the energy dashboard doesnāt actually come from an entity, but is instead added into the recorder using a statistic via an undocumented HA API.
This might be a limitation of HA but I will see
is this possibly related?
2024-04-20 11:14:46.783 ERROR (DbWorker_1) [homeassistant.components.recorder.util] Error executing query: 'str' object has no attribute 'discard'
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/recorder/util.py", line 141, in session_scope
yield session
File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 1830, in _get_last_statistics
metadata_ids = _extract_metadata_and_discard_impossible_columns(metadata, types)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/src/homeassistant/homeassistant/components/recorder/statistics.py", line 1586, in _extract_metadata_and_discard_impossible_columns
types.discard("mean")
^^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'discard''
I dont see the error with the component disabled but it appears as soon as I enable it - with my limited knowledge of python I can however see you use āstrā in the sensor code which I believe defines the return is a string?
fixed in latest release
Finally gotten around to installing this. Thanks for putting the integration together @11harveyj - it works a treat and has even imported historical consumption data too.
At the risk of being fussyā¦ Is it possible to put an Icon on the Integrations page?
Yep, I just need to open a PR to the HA brands repository.
Once Iāve sorted an issue out with the prices, Iām actually going to try and get this into core as itās a very simple integration and I can re-use a lot of stuff that already exists for other integrations.
Iāve raised a PR within the repo for logos & icons, just waiting to be merged
Perfect thank you
Just for awareness, the repository and module is currently private due to what could be a pretty bad security issue on Anglian Waterās side.
Massive thanks to @collse for identifying. I have reported to AW and will make this public and active again once they have had a chance to resolve.
I donāt want to cause issues for any AW customers and also AW themselves by keeping the code public.
Apologies all and hope you understand why.
was just about to drop you an email to enquire
Hi @11harveyj. Reading updates in this thread I understand why you have pulled the code. I assume, this is now why, having upgraded to HA 2024.5 I am now seeing this?
Any chance you can add me to the private repository so I can continue to use this integration whilst Anglian Water fix their exposure?
Hi,
Repo is public again, although I havenāt made a post yet as AW have pulled their API entirely at this point to fix so integration is currently not working.
Was supposed to be fixed Monday, but not heard anything from their IT team since.
Thanks - It looks like they have pulled the whole mobile application!
Yep, was a pretty serious data protection issue.
to be fair it was just poorly implemented - way to wide/open - not necessary, could have easily been jailed the query - weāll see what happens now
Seems its back on my stats are coming through again and this time they are correct
Yep, the mobile app is back now. I will test the latest update properly, but after upgrading to 2024.5.0 the integration will fix all the previous stats (including cost).
I can see their mobile app is back on line as @collse states, however, the integration is still not loading for me. Iāve tried disabling/re-enabling and even trying to add an additional integration - get āConfig flow could not be loaded: 500 Internal Server Error Server got itself in troubleā.
Also, here is my logā¦