A custom Home Assistant integration that monitors live fuel prices in Thailand by scraping motorist.co.th.
Prices cover Bangkok, Nonthaburi, Pathum Thani and Samut Prakan and are updated once per hour by default.
- 72 sensors out of the box — 64 per-station prices + 8 lowest-price sensors
- Covers 8 fuel grades and 8 major station brands
- Lowest-price sensors expose a
cheapest_stationattribute and a fullall_pricesbreakdown - Config Flow setup — no YAML editing required
- Configurable update interval (5 min – 24 h)
- Full HACS support and automatic GitHub releases on version bump
| Key | Display Name |
|---|---|
gasohol_95 |
Gasohol 95 |
gasohol_e20 |
Gasohol E20 |
gasohol_e85 |
Gasohol E85 |
gasohol_91 |
Gasohol 91 |
gasohol_95_premium |
Gasohol 95 Premium |
benzin_95 |
Benzin 95 |
diesel_b7 |
Diesel B7 |
diesel_b7_premium |
Diesel B7 Premium |
PTT · BCP · Shell · Caltex · IRPC · PT · Susco · Pure
Each sensor has the form sensor.thailand_petrol_<fuel_grade>_<station>.
| Entity ID example | State | Unit |
|---|---|---|
sensor.thailand_petrol_gasohol_91_ptt |
34.36 |
THB/L |
sensor.thailand_petrol_diesel_b7_shell |
33.54 |
THB/L |
Attributes: fuel_grade, station
One sensor per fuel grade: sensor.thailand_petrol_<fuel_grade>_lowest
| Entity ID example | State | Notable attributes |
|---|---|---|
sensor.thailand_petrol_gasohol_91_lowest |
34.36 |
cheapest_station, all_prices |
sensor.thailand_petrol_diesel_b7_lowest |
33.54 |
cheapest_station, all_prices |
The all_prices attribute contains a dictionary of all available station prices sorted cheapest first.
- Open HACS in Home Assistant.
- Click the three-dot menu → Custom repositories.
- Add
https://github.com/simplemice/ha_petrol_pricesas an Integration. - Search for Thailand Petrol Prices and click Download.
- Restart Home Assistant.
- Download the latest release zip from the Releases page.
- Extract the
thailand_petrol_pricesfolder into your<config>/custom_components/directory. - Restart Home Assistant.
- Go to Settings → Devices & Services → Add Integration.
- Search for Thailand Petrol Prices.
- Click Submit — the integration fetches prices immediately.
After setup, click Configure on the integration card to change the update interval.
| Option | Default | Range |
|---|---|---|
| Update interval (seconds) | 3600 (1 h) |
300 – 86400 |
automation:
- alias: "Notify cheap Gasohol 91"
trigger:
- platform: numeric_state
entity_id: sensor.thailand_petrol_gasohol_91_lowest
below: 34.00
action:
- service: notify.mobile_app_my_phone
data:
title: "Cheap fuel alert"
message: >
Gasohol 91 is now {{ states('sensor.thailand_petrol_gasohol_91_lowest') }} THB/L
at {{ state_attr('sensor.thailand_petrol_gasohol_91_lowest', 'cheapest_station') }}.automation:
- alias: "Weekly fuel summary"
trigger:
- platform: time
at: "08:00:00"
condition:
- condition: time
weekday:
- mon
action:
- service: notify.mobile_app_my_phone
data:
title: "This week's fuel prices"
message: >
Gasohol 91 cheapest: {{ states('sensor.thailand_petrol_gasohol_91_lowest') }} THB/L
({{ state_attr('sensor.thailand_petrol_gasohol_91_lowest', 'cheapest_station') }})
Diesel B7 cheapest: {{ states('sensor.thailand_petrol_diesel_b7_lowest') }} THB/L
({{ state_attr('sensor.thailand_petrol_diesel_b7_lowest', 'cheapest_station') }})type: entities
title: Gasohol 91 Prices
entities:
- entity: sensor.thailand_petrol_gasohol_91_ptt
- entity: sensor.thailand_petrol_gasohol_91_bcp
- entity: sensor.thailand_petrol_gasohol_91_shell
- entity: sensor.thailand_petrol_gasohol_91_caltex
- entity: sensor.thailand_petrol_gasohol_91_irpc
- entity: sensor.thailand_petrol_gasohol_91_pt
- entity: sensor.thailand_petrol_gasohol_91_susco
- entity: sensor.thailand_petrol_gasohol_91_pure
- entity: sensor.thailand_petrol_gasohol_91_lowest
name: "Lowest (any station)"template:
- sensor:
- name: "Best Gasohol 91 deal"
state: >
{{ states('sensor.thailand_petrol_gasohol_91_lowest') }} THB/L
at {{ state_attr('sensor.thailand_petrol_gasohol_91_lowest', 'cheapest_station') }}
icon: mdi:gas-stationSensors show "Unavailable"
The integration could not reach motorist.co.th. Check your internet connection and HA logs (Settings → System → Logs).
A specific station sensor is always unavailable
That station does not carry that fuel grade (shown as "–" on the website). This is expected.
Prices seem outdated
Reduce the update interval in the integration options. Fuel prices in Thailand typically change once per week (usually Thursday evening).
Downloading diagnostics
Go to Settings → Devices & Services → Thailand Petrol Prices → three-dot menu → Download diagnostics and attach the file to any bug report.
This project is licensed under the GNU General Public License v3.0. See LICENSE for details.
Data source: Motorist Thailand — prices reflect Bangkok and surrounding provinces.

