Advertisement
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
- value_template: >
- {% set fuelcompany = value_json.fuelprices | selectattr('company_name', 'eq', 'OK') | list | first %}
- {{ fuelcompany['gas_95'] }}
- json_attributes_path: "$.fuelprices[?(@.company_name == 'OK')]"
- json_attributes:
- - company_logo
- - gas_95
- - diesel
- - last_update
- - name: OK Diesel
- value_template: >
- {% set fuelcompany = value_json.fuelprices | selectattr('company_name', 'eq', 'OK') | list | first %}
- {{ fuelcompany['diesel'] }}
- json_attributes_path: "$.fuelprices[?(@.company_name == 'OK')]"
- json_attributes:
- - company_logo
- - gas_95
- - diesel
- - last_update
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement