NSW Fuel Station Price
The nsw_fuel_station
sensor platform uses the NSW Fuel Check App
Setup
To get the station ID for any NSW fuel station you will need to:
- Visit the Fuel Check App
. - Open the developer console of your browser (for Chrome, click View -> Developer -> Developer Tools). Click the “Network” tab in the developer console.
- In the Fuel Check App, search for your postcode or click “Fuel Near Me”.
- In the developer console, you should see a request to
/FuelCheckApp/v1/fuel/prices/bylocation
. Open this request and preview the response. Find the station you wish to add, and copy down theServiceStationID
field.
Alternatively:
- Select a station you wish to find the ID for.
- Select “Report this Station”.
- In the URL of the new page opened, locate
serviceStationId
.
Configuration
To add the NSW fuel station price sensor to your installation, add the following to your configuration.yaml
configuration.yaml 文件是 Home Assistant 的主要配置文件。它列出了要加载的集成及其特定配置。在某些情况下,需要直接在 configuration.yaml 文件中手动编辑配置。大多数集成可以在 UI 中配置。 [Learn more] file:
sensor:
- platform: nsw_fuel_station
station_id: 291
Configuration Variables
A list of fuel types to track for the station. Must be one of ["E10", "U91", "E85", "P95", "P98", "DL", "PDL", "B20", "LPG", "CNG", "EV"]
. Descriptions of fuel types can be found here
Default:
['E10', 'U91']