Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rest:
- - resource: http://rest.apptoo.dk/fuelfinder.json
- sensor:
- - name: OK 95
- device_class: monetary
- force_update: true
- unit_of_measurement: "kr."
- value_template: >
- {% set fuelcompany = value_json.fuelprices | selectattr('company_name', 'eq', 'OK') | list | first %}
- {{ fuelcompany['gas_95'] | float }}
- json_attributes_path: "$.fuelprices[?(@.company_name == 'OK')]"
- json_attributes:
- - company_logo
- - gas_95
- - diesel
- - last_update
- - name: OK Diesel
- device_class: monetary
- force_update: true
- unit_of_measurement: "kr."
- value_template: >
- {% set fuelcompany = value_json.fuelprices | selectattr('company_name', 'eq', 'OK') | list | first %}
- {{ fuelcompany['diesel'] | float }}
- json_attributes_path: "$.fuelprices[?(@.company_name == 'OK')]"
- json_attributes:
- - company_logo
- - gas_95
- - diesel
- - last_update
Add Comment
Please, Sign In to add comment