From e418885d0a458f0f6fd0f387aed4a9efede9edc7 Mon Sep 17 00:00:00 2001 From: Nick Whyte Date: Sun, 17 Jun 2018 02:03:53 +1000 Subject: [PATCH] NSW Fuel Station Price Sensor (#5477) * NSW Fuel Station Price Sensor * . * . * update doc * update doc * quote correctly * Update doc * Add headings and minimize configuration sample --- .../sensor.nsw_fuel_station.markdown | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 source/_components/sensor.nsw_fuel_station.markdown diff --git a/source/_components/sensor.nsw_fuel_station.markdown b/source/_components/sensor.nsw_fuel_station.markdown new file mode 100644 index 00000000000..5ebdb8fc51e --- /dev/null +++ b/source/_components/sensor.nsw_fuel_station.markdown @@ -0,0 +1,46 @@ +--- +layout: page +title: "NSW Fuel Station Price Sensor" +description: "Instructions on how to integrate NSW fuel station prices into Home Assistant." +date: 2018-06-02 18:00 +sidebar: true +comments: false +sharing: true +footer: true +ha_category: Fuel +ha_release: 0.72 +ha_iot_class: "Cloud Polling" +--- + +The `nsw_fuel_station` sensor platform uses the [NSW Fuel Check App](https://www.fuelcheck.nsw.gov.au/app) data as a source for current fuel price data. + +## {% linkable_title Setup %} + +To get the station ID for any NSW fuel station you will need to: + +- Visit the [Fuel Check App](https://www.fuelcheck.nsw.gov.au/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 the `ServiceStationID` field. + +## {% linkable_title Configuration %} + +To add the NSW fuel station price sensor to your installation, add the following to your `configuration.yaml` file: + +```yaml +sensor: + - platform: nsw_fuel_station + station_id: 291 +``` + +{% configuration %} +station_id: + description: The ID of the station to track + required: true + type: string +fuel_types: + description: 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](https://www.fuelcheck.nsw.gov.au/App/Home/FuelTypes). + required: false + default: "`['E10', 'U91']`" + type: list +{% endconfiguration %}