Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sensor:
- - platform: nordpool
- VAT: true
- currency: "NOK"
- price_in_cents: false
- low_price_cutoff: 0.95
- region: "NO2"
- precision: 2
- price_type: kWh
- additional_costs: >-
- {% set s = {
- "paaslag": 0.00,
- "nettleie_natt": 0.38,
- "nettleie_dag": 0.50
- }
- %}
- {% set add_cost = 0 %}
- {% if current_price > 0.9125 %}
- {% set add_cost = 0.9 * (current_price - 0.9125) * -1 %}
- {%endif%}
- {% set add_cost = add_cost + s.paaslag %}
- {%if now().hour >=6 and now().hour < 22 %}
- {% set add_cost = add_cost + s.nettleie_dag %}
- {%else%}
- {% set add_cost = add_cost + s.nettleie_natt %}
- {%endif%}
- {{add_cost | float(3) }}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement