Can somebody help me implement the following, which is a (Dutch) post on tweakers.net concerning variable energy prices from EasyEnergy? (I’m quite the beginner in Home Assistant, and can’t figure out what I am doing wrong).
It is the following post on tweakers I’m trying to implement: het grote day ahead energie prijzen topic. - Wonen - GoT
My configuration.yaml now looks as follows:
# Loads default set of integrations. Do not remove.
default_config:
- platform: template
sensors:
prijsopslag_energie:
friendly_name: "Prijsopslag Energie"
value_template: "{{(0.968+4.452+3.691+0.064)/100}}"
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
rest: !include rest.yaml
sensor: !include sensors.yaml
I’ve created the file rest.yaml with this code.
In sensors.yaml I have added this code.
In my dashboard I have added this lovelace code.
In my logs I can see the following errors:
TemplateError('ValueError: Template error: float got invalid input 'unknown' when rendering template '{{[ states('sensor.energieprijs_uur_0')|float, states('sensor.energieprijs_uur_1')|float, states('sensor.energieprijs_uur_2')|float, states('sensor.energieprijs_uur_3')|float, states('sensor.energieprijs_uur_4')|float, states('sensor.energieprijs_uur_5')|float, states('sensor.energieprijs_uur_6')|float, states('sensor.energieprijs_uur_7')|float, states('sensor.energieprijs_uur_8')|float, states('sensor.energieprijs_uur_9')|float, states('sensor.energieprijs_uur_10')|float, states('sensor.energieprijs_uur_11')|float, states('sensor.energieprijs_uur_12')|float, states('sensor.energieprijs_uur_13')|float, states('sensor.energieprijs_uur_14')|float, states('sensor.energieprijs_uur_15')|float, states('sensor.energieprijs_uur_16')|float, states('sensor.energieprijs_uur_17')|float, states('sensor.energieprijs_uur_18')|float, states('sensor.energieprijs_uur_19')|float, states('sensor.energieprijs_uur_20')|float, states('sensor.energieprijs_uur_21')|float, states('sensor.energieprijs_uur_22')|float, states('sensor.energieprijs_uur_23')|float, ]|average}}' but no default was specified') while processing template 'Template("{{[ states('sensor.energieprijs_uur_0')|float, states('sensor.energieprijs_uur_1')|float, states('sensor.energieprijs_uur_2')|float, states('sensor.energieprijs_uur_3')|float, states('sensor.energieprijs_uur_4')|float, states('sensor.energieprijs_uur_5')|float, states('sensor.energieprijs_uur_6')|float, states('sensor.energieprijs_uur_7')|float, states('sensor.energieprijs_uur_8')|float, states('sensor.energieprijs_uur_9')|float, states('sensor.energieprijs_uur_10')|float, states('sensor.energieprijs_uur_11')|float, states('sensor.energieprijs_uur_12')|float, states('sensor.energieprijs_uur_13')|float, states('sensor.energieprijs_uur_14')|float, states('sensor.energieprijs_uur_15')|float, states('sensor.energieprijs_uur_16')|float, states('sensor.energieprijs_uur_17')|float, states('sensor.energieprijs_uur_18')|float, states('sensor.energieprijs_uur_19')|float, states('sensor.energieprijs_uur_20')|float, states('sensor.energieprijs_uur_21')|float, states('sensor.energieprijs_uur_22')|float, states('sensor.energieprijs_uur_23')|float, ]|average}}")' for attribute '_attr_native_value' in entity 'sensor.gemiddelde_energieprijs_vandaag'
22:07:30 – (ERROR) helpers/template_entity.py - message first occurred at 22:07:30 and shows up 2 times
Error while processing template: Template("{{[ states('sensor.energieprijs_uur_0')|float, states('sensor.energieprijs_uur_1')|float, states('sensor.energieprijs_uur_2')|float, states('sensor.energieprijs_uur_3')|float, states('sensor.energieprijs_uur_4')|float, states('sensor.energieprijs_uur_5')|float, states('sensor.energieprijs_uur_6')|float, states('sensor.energieprijs_uur_7')|float, states('sensor.energieprijs_uur_8')|float, states('sensor.energieprijs_uur_9')|float, states('sensor.energieprijs_uur_10')|float, states('sensor.energieprijs_uur_11')|float, states('sensor.energieprijs_uur_12')|float, states('sensor.energieprijs_uur_13')|float, states('sensor.energieprijs_uur_14')|float, states('sensor.energieprijs_uur_15')|float, states('sensor.energieprijs_uur_16')|float, states('sensor.energieprijs_uur_17')|float, states('sensor.energieprijs_uur_18')|float, states('sensor.energieprijs_uur_19')|float, states('sensor.energieprijs_uur_20')|float, states('sensor.energieprijs_uur_21')|float, states('sensor.energieprijs_uur_22')|float, states('sensor.energieprijs_uur_23')|float, ]|average}}")
22:07:30 – (WARNING) config_entries.py - message first occurred at 22:07:21 and shows up 2 times
Error adding entities for domain sensor with platform rest
22:07:22 – (ERROR) Sensor - message first occurred at 22:07:22 and shows up 49 times
And in my dashboard I get the following errors (as the sensors do not exist):
Can someone tell me what I’m doing wrong? And how I can fix it?
Thanks a bunch!