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

Unique ids #30

Closed 1mfaasj closed 1 year ago

1mfaasj commented 1 year ago

Hi Is it possible to add unique ids to the sensors? Ive tried to add multiple hubs in the carbu integration, so for instance 1 fuel station in NL and 2 in Belgiu 'maasmechelen with zipcode 3630, one in BE is succesfull, the other BE is not:

Platform carbu_com does not generate unique IDs. ID Carbu.com super95 prediction already exists

Platform carbu_com does not generate unique IDs. ID Carbu.com super95 3630 price already exists

Maybe you can add the name of the fuel station after the zipcode in the sensor id/name?

Thanks!

myTselection commented 1 year ago

Hi, I have looked into this in the past. But adding the fuel station in the sensor name is not an option, as the station will change at anytime, being the cheapest of the region.

The warning related to the predicion is also expected, as there is only one general prediction per fuel type, which is not linked to location or station, just general expectation. You can just ignore this warning, as the existing prediciton sensor should work fine and you'd need only one of these as else they would always all have the same value anyway.

Strange that you have the warning "Carbu.com super95 3630 price already exists". That would mean you have added twice the 3630 postcode, which probably would make little sense to add it twice? Or was there any particular need for this?

1mfaasj commented 1 year ago

correct I am trying to add 2 fuel stations with the same zip code (3630) in Maasmechelen and then HA nags about the unique ID, so it doesn't only occur with the prediction sensor. the reason is that we always go to these 2, so we don't always look for new fuel stations, it's one of the two.

Could you give a unique name per gas station in a certain region?

myTselection commented 1 year ago

That looks like a valid case to me, I was not aware you had selected an individual station. Fixed in R7.2.0