Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - platform: template
- sensors:
- elpris_tomorrow_available:
- friendly_name: "Elpris tomorrow available"
- #AGR - Indsæt din nordpool sensor her for at vide om morgendagens priser er tilgængelige
- value_template: "{{ state_attr('sensor.nordpool_kwh_dk2_dkk_3_095_025', 'tomorrow_valid') }}"
- - platform: nordpool
- # Should the prices include vat? Default True
- VAT: True
- # What currency the api fetches the prices in
- # this is only need if you want a sensor in a non local currecy
- currency: "DKK"
- # Helper so you can set your "low" price
- # low_price = hour_price < average * low_price_cutoff
- low_price_cutoff: 0.95
- # What power regions your are interested in.
- # Possible values: "DK1", "DK2", "FI", "LT", "LV", "Oslo", "Kr.sand", "Bergen", "Molde", "Tr.heim", "Tromsø", "SE1", "SE2", "SE3","SE4", "SYS", "EE"
- region: "DK2"
- # How many decimals to use in the display of the price
- precision: 3
- # What the price should be displayed in default
- # Possible values: MWh, kWh and Wh
- # default: kWh
- price_type: kWh
- # This option allows the usage of a template to add a tariff.
- # now() always refers start of the hour of that price.
- # this way we can calculate the correct costs add that to graphs etc.
- # The price result of the additional_costs template expects this additional cost to be in kWh and not cents as a float
- # default {{0.0|float}}
- additional_costs: '{% set s = {
- "elafgift": 1.125,
- "transport_lavlast": 0.2954,
- "transport_spidslast": 0.7884,
- "abonnement": 0.14
- } %}
- {% if now().month >= 10 or now().month <4 %}
- {% if now().hour >=17 and now().hour <21 %}
- {{s.elafgift+s.transport_spidslast+s.abonnement}}
- {% else %}
- {{s.elafgift+s.transport_lavlast+s.abonnement}}
- {% endif %}
- {% else %}
- {{s.elafgift+s.transport_lavlast+s.abonnement}}
- {% endif %}'
- - platform: template
- sensors:
- powerprice_rt:
- friendly_name: Strøm realtid
- icon_template: mdi:home-lightning-bolt
- value_template: >-
- {% set pris = states['sensor.nordpool_kwh_dk2_dkk_3_095_025'].attributes.current_price %}
- {% set kwh = states.sensor.electricity_meter.state | float %}
- {{((pris*kwh*100) | int)/100}}
- - platform: template
- sensors:
- powerprice_hourly:
- friendly_name: 'Strømudgift, time'
- device_class: energy
- unit_of_measurement: Kr
- value_template: >-
- {% if is_number(states('sensor.power_hourly')) %}
- {{ (states('sensor.power_hourly') | float) / 1000 * states['sensor.nordpool_kwh_dk2_dkk_3_095_025'].attributes.current_price }}
- {% else %}
- None
- {% endif %}
- - platform: template
- sensors:
- energy_hourly:
- friendly_name: 'Strømforbrug, time'
- device_class: energy
- unit_of_measurement: kWh
- value_template: >-
- {% if is_number(states('sensor.power_hourly')) %}
- {{ (states('sensor.power_hourly') | float) / 1000 }}
- {% else %}
- None
- {% endif %}
- - platform: template
- sensors:
- energy_daily:
- friendly_name: 'Strømforbrug, dag'
- device_class: energy
- unit_of_measurement: kWh
- value_template: >-
- {% if is_number(states('sensor.power_daily')) %}
- {{ (states('sensor.power_daily') | float) / 1000 }}
- {% else %}
- None
- {% endif %}
- - platform: template
- sensors:
- energy_monthly:
- friendly_name: 'Strømforbrug, måned'
- device_class: energy
- unit_of_measurement: kWh
- value_template: >-
- {% if is_number(states('sensor.power_monthly')) %}
- {{ (states('sensor.power_monthly') | float) / 1000 }}
- {% else %}
- None
- {% endif %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement