Dutch gas prices addon

Depends on the trigger of your automation. The docs example is 5 past the hole hour, so yes it can take a while . The sensors disappear after as reboot, or are stated as unknown. If you do not want that, add a reboot trigger for instance.

1 Like

Supervisor, homeassitant and the broker logs do not have anything weird in the logs. How does this work, is it a mqtt sensor that i can add manually? I can not see any fuel stations in homeassistant/sensor/dgp/status when using mqtt explorer, just seeing some logs

Ok, that makes things better :wink:

Removed rest sensor and added HA restart trigger, works almost instantly. And thank you again :wink:

1 Like

Sorry, i was looking with my eyes in my pants. This is the error but i can’t see why. Are there more of these errors?

I changed the radius from 10km to 2km so the logs are a bit smaller, and this fixed the issue…

That makes no sense, what happens if you go back to 10?

Tried it, gives that same error on the end, and does not update the sensors. Seems something is wrong with the radius, or one of the petrol stations is giving corrupt data that breaks the script?

Edit: tested 5km, also works fine…

just for a different view, I use radius 5, to publish results 10 and that works flawlessly fine since Juli 2021.

So “normal” this… Got it working, gone… not thanks, no bye, just gone with the wind… Well, with today’s dutch wind, probably gone far away…

Oh well, did not know we are done testing, the 10km one still does not work. but it is fine, i will just keep it on 5km. Thanks for your help guys @EnsconcE @BebeMischa !

You welcome :wink:

New update: 2022.2.27.1. Minor fixes

@Madoow I am unable to reproduce your problem with this payload. Are you still experiencing problems when you use a radius of 10?

{
    'fuel_type': 'euro98', 
    'radius': 10, 
    'latitude': 51.878924561661385,
    'longitude': 4.597088986501641, 
    'to_publish': 5
}
1 Like

With 2022.2.27.1 my addon stopped working.
Even restoring backup to previous version now returns nothing.

Addons is running, automation works, there is MQTT connection, but no gas price sensors are created… :frowning:

Strange…
downgraded, deleted all sensors manually, upgraded again and it seems to be working again…

Unable to process payload 'snip' 
with error: ''<' not supported between instances of 
'NoneType' and 'float''

Is there a way I can help solving this error? Happens for me too, does not matter which radius I use. Debug logs don’t show enough details to trace where the error comes from.

I need to reproduce the error, could you sent me the longitude and latitude that you are using? If you do not want to share it publicity, you can sent it to me privately

Best would be to sent me the whole payload that is used

Hi,

I’ve had the same issue for me as well. Turns out that ‘some’ stations generate None values for gas prices since they cannot be retrieved:


Publish tries to compare all floats whilst 1 none type is present :slight_smile:

@EnsconcE is there something that you can adjust in your script to ignore None values?

2 Likes

@Dennisvd thanks, this is something i can work with. As soon as i have time i will update the addon.

2 Likes

@parrel and @Dennisvd the None type issue is fixed with 2022.3.21.1

2 Likes

Another update hit the road today:

  • Added the ability to use a unique identifier for the cheapest gas station sensors
  • Documentation updates
2 Likes