Closed Armadill0 closed 4 years ago
Thanks for the detailed analysis!
This looks like a duplicate of #33061 (or at least seems to share the root cause), the fix should be available in 0.107.5. Can you try again when that is available and see if it can still be reproduced?
Yes works with 0.107.5, thank you! 😄
The problem
Hey guys,
I'm using home-assistant custom installed since some days and started using the Tankerkoenig integration today. I configured it via the configuration yaml, see below.
Afterwards I configured the third party plugin "auto-entities" to retrieve a list of stations with a specific fuel_type type ordered by price:
I also customized some station names for recognition, although I think this has nothing to do with this issue.
The problem is, that there are stations missing which should definitely be in the search radius I defined in the configuration.
Finally I compared the stations which are being displayed with the list of data which was retrieved from the Tankerkoenig API and now I am sure that I only get the first 10 devices frm the distance point of view. And this is the problem that my representation in the UI misses stations which is being sorted after the actual price of the fuel.
I also increased the search radius to 15km. That brought a lot more stations than in the logs below, but the screenshot above is the result from that. So, that didn'thelp at all.
Environment
Problem-relevant
configuration.yaml
Traceback/Error logs
What made me curious that something is wrong were some missiung stations which definitely are (checked that via Tankerkeinig site, API and the HA logs) in the 8km radius I defined on the configuration. So I increased the logging to debug and found this:
There are a LOT of those errors for exactly the stations which I missed before.
So I further digged into that, played around with some custom logging at the error point in the sensor.py file and finally found some early logging of tankerkoenig:
This was quite surprising because within this former log entries ALL data of all stations which should be there is definitely available. This makes me pretty sure, that this is an error within home-assistant because Tankerkoenig definitely delivers the data.
Additional information
I added some debugging lines right before line 112 of the sensor.py and got this:
Normally there should be a debug logging for each fuel type of a station containing the station_id, fuel_type and the station data. But as you can see the data sometimes simply is missing as if it really is not there.