Filtered min/max gas price sensors
This commit is contained in:
@ -96,32 +96,18 @@ scrape:
|
||||
value_template: '{{ value | replace("$", "") | float }}'
|
||||
icon: mdi:gas-station
|
||||
|
||||
# Possible alternate way to do things, may revisit later, keeping for reference
|
||||
|
||||
# rest:
|
||||
# - scan_interval: 3600
|
||||
# resource: https://www.gasbuddy.com/graphql
|
||||
# method: POST
|
||||
# headers:
|
||||
# Content-Type: application/json
|
||||
# payload: |
|
||||
# {
|
||||
# "operationName": "LocationBySearchTerm",
|
||||
# "variables": {
|
||||
# "fuel": 1,
|
||||
# "maxAge": 0,
|
||||
# "search": "43512"
|
||||
# },
|
||||
# "query": "query LocationBySearchTerm($search: String) { locationBySearchTerm(search: $search) { trends { areaName country today todayLow } } }"
|
||||
# }
|
||||
# sensor:
|
||||
# - unique_id: gasbuddy_lowest_gas_price
|
||||
# name: Gasbuddy Lowest Gas Price
|
||||
# icon: mdi:gas-station
|
||||
# unit_of_measurement: USD
|
||||
# value_template: "{{ value_json.data.locationBySearchTerm.trends.0.todayLow | float }}"
|
||||
# - unique_id: gasbuddy_average_gas_price
|
||||
# name: Gasbuddy Average Gas Price
|
||||
# icon: mdi:gas-station
|
||||
# unit_of_measurement: USD
|
||||
# value_template: "{{ value_json.data.locationBySearchTerm.trends.0.today | float }}"
|
||||
sensor:
|
||||
- platform: statistics
|
||||
unique_id: fcf4e80e-8459-4e23-a94f-5f127b628c20
|
||||
name: Local Maximum Gas Price Filtered
|
||||
entity_id: sensor.local_maximum_gas_price
|
||||
state_characteristic: mean
|
||||
max_age:
|
||||
hours: 24
|
||||
- platform: statistics
|
||||
unique_id: 6a8c9dd1-980c-45b2-bbc1-c5f1777d434a
|
||||
name: Local Minimum Gas Price Filtered
|
||||
entity_id: sensor.local_minimum_gas_price
|
||||
state_characteristic: mean
|
||||
max_age:
|
||||
hours: 24
|
||||
|
Reference in New Issue
Block a user