Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/erkexzcx/saurida-fuel-prices
Saurida fuel prices in Lithuania API
https://github.com/erkexzcx/saurida-fuel-prices
api chatgpt gpt4 homeassistant homeassistant-integration price-tracker
Last synced: about 1 month ago
JSON representation
Saurida fuel prices in Lithuania API
- Host: GitHub
- URL: https://github.com/erkexzcx/saurida-fuel-prices
- Owner: erkexzcx
- License: gpl-3.0
- Created: 2023-09-20T09:17:08.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-12T09:09:39.000Z (7 months ago)
- Last Synced: 2024-04-12T23:27:26.252Z (7 months ago)
- Topics: api, chatgpt, gpt4, homeassistant, homeassistant-integration, price-tracker
- Language: Python
- Homepage: https://www.saurida.lt/kuro-kainos-degalinese/
- Size: 142 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Saurida fuel prices API
Saurida fuel prices in Lithuania. A poor man's API.
# Usage
## CLI
You can easily get price using below request in bash (see [prices.json](https://github.com/erkexzcx/saurida-fuel-prices/blob/main/prices.json) for more details):
```bash
curl -s https://raw.githubusercontent.com/erkexzcx/saurida-fuel-prices/main/prices.json | jq '.alytus_miskininku_g.dyzelinas_b7'
```## Home Assistant integration
Update `configuration.yml` and add below code (see [prices.json](https://github.com/erkexzcx/saurida-fuel-prices/blob/main/prices.json) for more details):
```yaml
sensor:
- platform: rest
scan_interval: 3600 # 1 hour
resource: "https://raw.githubusercontent.com/erkexzcx/saurida-fuel-prices/main/prices.json"
name: "Saurida Alytus, Miškininkų g. diesel price"
value_template: '{{ value_json.alytus_miskininku_g.dyzelinas_b7 }}'
force_update: True
icon: "mdi:gas-station"
unit_of_measurement: "€/l"
```