Skip to content

Commit

Permalink
Merge branch 'master' of github.com:myTselection/Carbu_com
Browse files Browse the repository at this point in the history
  • Loading branch information
myTselection committed Oct 13, 2024
2 parents 32ad0e5 + 8991702 commit 2c2b77d
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,17 @@
[![GitHub last commit](https://img.shields.io/github/last-commit/myTselection/carbu_com.svg)](https://github.com/myTselection/carbu_com/commits/master)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/myTselection/carbu_com.svg)](https://github.com/myTselection/carbu_com/graphs/commit-activity)

# Carbu.com Home Assistant integration
[Carbu.com](https://www.Carbu.com/) Home Assistant custom component. This custom component has been built from the ground up to bring Carbu.com & Mazout.com site data to compare and save on your fuel oil, diesel, lpg and Super prices and integrate this information into Home Assistant to help you towards a better follow up. This integration is built against the public website provided by Carbu.com and other similar sites. Sensors will be created for the currently **cheapest** gas station in a region (at location, within 5km and within 10km).
# Carbu.com Home Assistant integration for cheapest fuel stations
Home Assistant custom component to create sensors with information on the cheapest fuel station in a chosen area. This custom component has been built from the ground up to bring for example Carbu.com & Mazout.com and similar site data to compare and save on your fuel oil, diesel, lpg and Super prices and integrate this information into Home Assistant. This integration is built against the public websites provided by Carbu.com and other similar sites. Sensors will be created for the currently **cheapest** gas station in a region (at location, within 5km and within 10km). The cheapest fuel station in between two locations can be retrieved too.

**Currently supporting fuel stations in Belgium, France, Luxembourg, Spain, Netherlands, Germany, Italy and US and on routes.**

This integration is in no way affiliated with Carbu.com.

| :warning: Please don't report issues with this integration to Carbu or other platforms, they will not be able to support you. |
| ------------------------------------------------------------------------------------------------------------------------------|

Since R5.0, beta support for fuel prices in Germany (DE) has been added. City or postalcode can be provided as location.

Since R6.0, beta support for fuel prices in Italy (IT) has been added. Postalcode and town need to be provided.

Since R7.0, beta support for fuel prices in Netherlands (NL) has been added. Postalcode and town need to be provided.

Since R8.0, beta support for fuel prices in Spain (ES) has been added. Postalcode and town need to be provided.

Since R10.0, beta support for fuel prices in USA (US) has been added. Postalcode and town need to be provided.

Since R11.0, [Geoapify.com](https://myprojects.geoapify.com/register) API key required to perform geocoding and reverse geocoding (required for countries IT, NL, ES, US and for services to find fuel on route or on coordinates). [GeoApify.com](https://geoapify.com/pricing) offers free tier of 3000 requests per day and up to 5 request/sec.
Since R11.0, a [Geoapify.com](https://myprojects.geoapify.com/register) API key is required to perform geocoding and reverse geocoding (required for countries IT, NL, ES, US and for services to find fuel on route or on coordinates). [GeoApify.com](https://geoapify.com/pricing) offers free tier of 3000 requests per day and up to 5 request/sec.


Some discussion on this topic can be found within [the Home Assistant community forum](https://community.home-assistant.io/t/rest-sensor-needs-to-get-latest-element-of-list/404882/4).
Expand All @@ -37,7 +29,7 @@ For cheapest Belgian gas and electricity contracts, prices and promotions, pleas


## Installation
- [HACS](https://hacs.xyz/): add url https://github.com/myTselection/carbu_com as custom repository (HACS > Integration > option: Custom Repositories)
- [HACS](https://hacs.xyz/): search for Carbu in the default HACS repo list or use below button to navigate directly to it on your local system and install via HACS.
- [![Open your Home Assistant instance and open the repository inside the Home Assistant Community Store.](https://my.home-assistant.io/badges/hacs_repository.svg?style=flat-square)](https://my.home-assistant.io/redirect/hacs_repository/?owner=myTselection&repository=Carbu_com&category=integration)
- Restart Home Assistant
- Add 'Carbu.com' integration via HA Settings > 'Devices and Services' > 'Integrations'
Expand All @@ -52,6 +44,21 @@ For cheapest Belgian gas and electricity contracts, prices and promotions, pleas
- The checkboxes are required since else clearing the text of the configuration was not recorded (HA bug?) and filter or templates could no longer be removed once set.
- When setting a sensor 'friendly name' template, any sensor attribute can be used as a placeholder which will be replaced with the actual value. Eg: `Price {fueltype} {fuelname} {supplier}` could be used as a template for the Price sensor. All available attributes can be fetched using the 'Developer Tools' > 'States' > 'Attributes' view in HA or using the tables listed below.

### Setup screenshot
![Carbu com setup config](https://github.com/user-attachments/assets/103221e3-3a0a-48ef-a3ae-00b59ee5e2cb)

For BE/FR/LU, sensors for mazout/fuel oil can be added too.

![Carbu com BE-FR-LU fuel mazout prices](https://github.com/user-attachments/assets/1b9d0f16-3e88-4797-9e53-c69624a1f35d)


If desired (selection box default off), the fuel price of a specific individual station can be shown. If no individual station is enabled, the cheapest station in the area will be retrieved and price and address details will be shown in the sensor attributes.

![Carbu com optional specific gas station](https://github.com/user-attachments/assets/81cbb120-5b1c-4d25-bdc9-9f6b7c09f209)




## Integration
### Sensors
- <details><summary>Sensor with lowest diesel and super <code>sensor.carbu_com_[fueltype]_[postalcode]_price</code> and lowest fuel oil <code>sensor.carbu_com_[fueltype]_[postalcode]_[quantity]l_price</code> Fuel oil only supported for BE/FR/LU</summary>
Expand Down Expand Up @@ -149,7 +156,7 @@ For cheapest Belgian gas and electricity contracts, prices and promotions, pleas
| `quantity` | Quantity for which the price is expected. Main difference between below or above 2000l |
</details>

### Services
### Services / Actions
A **service `carbu_com.get_lowest_fuel_price`** to get the lowest fuel price in the area of a postalcode is available. For a given fuel type and a distance in km, the lowest fuel price will be fetched and an event will be triggered with all the details found. Similar, the service **`carbu_com.get_lowest_fuel_price_coor`** can be called providing latitude and longitude coordinates instead of country, postalcode and town.

- <details><summary>Event data returned, event name: <code>carbu_com_lowest_fuel_price</code> / <code>carbu_com_lowest_fuel_price_coor</code></summary>
Expand Down

0 comments on commit 2c2b77d

Please sign in to comment.