Hi Guys’n’Girls
Bear with me, I’m a newbie at home assistant…
I have installed the GitHub - custom-components/nordpool: This component allows you to pull in the energy prices into Home-Assistant., and it works.
But when I read the guide it says I can add additional_costs. I assume it goes into the configuration.yaml (assuming because for us new guys the manual assumes we know where configurations go)
So I inserted this:
sensor:
- platform: nordpool
additional_costs: "{% set s = {
"hourly_fixed_cost": 0.5352,
"winter_night": 0.265,
"winter_day": 0.465,
"summer_day": 0.284,
"summer_night": 0.246,
"cert": 0.01
}
%}
{% if now().month >= 5 and now().month < 11 %}
{% if now().hour >= 6 and now().hour < 23 %}
{{ s.summer_day + s.hourly_fixed_cost + s.cert | float }}
{% else %}
{{ s.summer_night + s.hourly_fixed_cost + s.cert|float }}
{% endif %}
{% else %}
{% if now().hour >= 6 and now().hour < 23 %}
{{ s.winter_day + s.hourly_fixed_cost + s.cert | float }}
{% else %}
{{ s.winter_night + s.hourly_fixed_cost + s.cert | float }}
{% endif %}
{% endif %}"
But the studio code server plugin just gives me a heap of errors when I do that?!
Can one of you please refer me to a “how to” for newbies on inserting that kind of code into home assistant config files?
Before I lose my mind trying to figure this out, I can’t seem to google the right keywords for me to find a solution…
Kind regards