Created
January 31, 2022 21:19
-
-
Save JBoye/14d1eead49c2103785a1fc09b0426d63 to your computer and use it in GitHub Desktop.
Benzin vs El pris
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sensor: | |
- platform: template | |
sensors: | |
jenny_electric_price: | |
friendly_name: Jenny KR pr KM EL | |
unit_of_measurement: "kr/km" | |
icon_template: mdi:ev-station | |
value_template: > | |
{{ ((states("sensor.elpris") | float) / 4) | round(2) }} {# 4 km/kwh #} | |
jenny_electric_price_refund: | |
friendly_name: Jenny KR pr KM EL inkl. refusion | |
unit_of_measurement: "kr/km" | |
icon_template: mdi:ev-station | |
value_template: > | |
{{ ((states("sensor.elpris") | float - 1.03) / 4) | round(2) }} {# 4 km/kwh - 1.03kr pr kwh i refusion #} | |
jenny_petrol_price: | |
friendly_name: Jenny KR pr KM Benzin | |
unit_of_measurement: "kr/km" | |
icon_template: mdi:gas-station | |
value_template: > | |
{{ ((states("sensor.benzinpris") | float) / 15) | round(2) }} {# 15 km/l #} | |
- platform: scrape | |
resource: https://www.fuelfinder.dk/listprices.php | |
name: Benzinpris | |
unit_of_measurement: "kr/l" | |
device_class: monetary | |
select: ".numbers:nth-child(4)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment