myTselection / Carbu_com

Actual fuel prices (super, diesel, lpg) per gasstation supported for Belgium, France, Luxembourg, Spain, Netherlands, Germany, Italy and US! Home Assistant custom component HACS integration for BE/FR/LU based on carbu.com and mazout.com site to compare and save on your actual fuel oil/heating oil (mazout) and fuel (diesel, super and lpg) purchases.
MIT License
23 stars 6 forks source link

How to get prices for a specific service station? #20

Closed screenagerbe closed 1 year ago

screenagerbe commented 1 year ago

I really like this integration, but I was wondering if I could select the prices for a specific service station? I've got several stations nearby, but they are geographically on opposite sides of town (one S, one N), the distance to my home is more or less the same. It would be great if I could get the prices of both of them and put them next to each other. Does the service supports the data-id from the source?

Another question more or less related. I can call the service carbu_com.get_lowest_fuel_price but where is the response going? I just can't find the event in all the other events that are happening at the same time. So I also ask some advice on how to setup an automated service call which collects the results in a sensor so it can be exposed in a Lovelace dashboard.

myTselection commented 1 year ago

Hi, I initially started with the same, see this topic in HA forum: https://community.home-assistant.io/t/dutch-gas-priceses/59230/70?u=myt So, with such a sensor you could get the price of a very specific gas station. Another approach could be to use this carbu_com integration, set a postalcode and a filter on station brand. I suppose you won't have that many stations of the same brand in one town...

Related to your second request: service call will return an event with name event_type: carbu_com_lowest_fuel_price, see the README for a full example service call and automation that can get triggered when the result is available.

screenagerbe commented 1 year ago

Thanks, that scrape sensor is doing what it needs to do. Which also means I don't need to use the service call 🙂