metbril / home-assistant-brandstofprijzen Goto Github PK
View Code? Open in Web Editor NEWHome Assistant component for fuel prices from United Consumers
License: GNU General Public License v3.0
Home Assistant component for fuel prices from United Consumers
License: GNU General Public License v3.0
Update to most commonly used user agent like Win10 Chrome 87
Describe the bug
A clear and concise description of what the bug is.
Noticing these errors:
2023-12-20 16:06:20.162 ERROR (MainThread) [homeassistant.components.sensor] brandstofprijzen: Error on device update! Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 575, in _async_add_entity await entity.async_device_update(warning=False) File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 961, in async_device_update await hass.async_add_executor_job(self.update) File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/config/custom_components/brandstofprijzen/sensor.py", line 129, in update self._state = self.rest.data[idx] ~~~~~~~~~~~~~~^^^^^ IndexError: list index out of range
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
No error. :-)
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Additional context
Add any other context about the problem here.
It looks like it seems to work without error as I see updates of the 'brandstofprijzen'
I LOVE this but would it be possible to add data from https://carbu.com/ ?
Since prices here in Belgium are quite different then the netherlands it would be much more useful.
Thanks for all the work and keep up the good work ๐
Since 29 April, the action is failing.
https://github.com/metbril/home-assistant-brandstofprijzen/actions/runs/794512021
The error is:
[MANIFEST] Domain is missing an IoT Class
but the hacs.json
file has one:
"iot_class": ["Assumed State", "Cloud Polling"]
So I'm not sure how to fix this from the documentation
After upgrading to 2021.12.b2 I'm seeing this warning in my logs:
Logger: homeassistant.helpers.entity
Source: helpers/entity.py:549
First occurred: 7 december 2021 19:07:28 (4 occurrences)
Last logged: 7 december 2021 19:07:29
Entity sensor.adviesprijs_euro95 (<class 'custom_components.brandstofprijzen.sensor.BrandstofprijzenSensor'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.adviesprijs_diesel (<class 'custom_components.brandstofprijzen.sensor.BrandstofprijzenSensor'>) implements device_state_attributes. Please report it to the custom component author.
Entity sensor.adviesprijs_lpg (<class 'custom_components.brandstofprijzen.sensor.BrandstofprijzenSensor'>) implements device_state_attributes. Please report it to the custom component author.
Read about it in the official HA discord server and found this:
"device_state_attributes -> extra_state_attributes, is a name change... its really just that"
Next to the current price, the website provides the difference with the previous price. Add this difference as an attribute to the sensor.
Add version to manifest.json
https://developers.home-assistant.io/blog/2021/01/29/custom-integration-changes/#versions
Currently only the 3 main fuel types are supported. Extend the component to support all available fuel types from the United Consumers website.
I started getting an error log from this integration since about early November. I just noticed that it's now only receiving 7 values instead of 8, so BlueOne95 is missing, as you can see here as well: https://www.unitedconsumers.com/brandstofprijzen/
I commented out BlueOne95 from my configuration and now everything is fine. Should the documentation be updated to remove BlueOne95? Although it seems like they still track it's price as seen on this page.
Could you add state_class: measurement
to the sensors so it can be used for the recently added statistics functionality in HA?
The custom component should be included in the HACS repository
https://hacs.xyz/docs/developer/start
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.