A mi tambien me falla el coste y consume por hora, los demas si que funcionan… Si que tengo el módulo del pvpc.
Me salen estos errores en el log:
Entity sensor.ide_meter_reading (<class 'custom_components.ide.sensor.IDESensor'>) implements device_state_attributes. Please report it to the custom component author.
Error while processing template: Template("{% if is_state_attr('sensor.pvpc', 'period', 'P1') %} {% set peaje=states('input_number.peaje_energia_p1') | float %} {% elif is_state_attr('sensor.pvpc', 'period', 'P2') %} {% set peaje=states('input_number.peaje_energia_p2') | float %} {% elif is_state_attr('sensor.pvpc', 'period', 'P3') %} {% set peaje=states('input_number.peaje_energia_p3') | float %} {% endif %} {{ (( states('sensor.home_energy_hourly') | float * (peaje + states('sensor.pvpc') | float) ) * (1 - states('input_number.bono_social') | float) * states('input_number.impuesto_energia') | float * states('input_number.iva_energia') | float) | round(3) }}")
Traceback (most recent call last):
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/site-packages/homeassistant/helpers/template.py", line 406, in async_render
render_result = _render_with_context(self.template, compiled, **kwargs)
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/site-packages/homeassistant/helpers/template.py", line 1771, in _render_with_context
return template.render(**kwargs)
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/site-packages/jinja2/environment.py", line 1291, in render
self.environment.handle_exception()
File "/home/homeassistant/.pyenv/versions/3.9.9/lib/python3.9/site-packages/jinja2/environment.py", line 925, in handle_exception
raise rewrite_traceback_stack(source=source)
File "<template>", line 1, in top-level template code
jinja2.exceptions.UndefinedError: 'peaje' is undefined
Template warning: 'float' got invalid input 'unavailable' when rendering template '{% if is_state_attr('sensor.pvpc', 'period', 'P1') %} {% set peaje=states('input_number.peaje_energia_p1') | float %} {% elif is_state_attr('sensor.pvpc', 'period', 'P2') %} {% set peaje=states('input_number.peaje_energia_p2') | float %} {% elif is_state_attr('sensor.pvpc', 'period', 'P3') %} {% set peaje=states('input_number.peaje_energia_p3') | float %} {% endif %} {{ (( states('sensor.home_energy_hourly') | float * (peaje + states('sensor.pvpc') | float) ) * (1 - states('input_number.bono_social') | float) * states('input_number.impuesto_energia') | float * states('input_number.iva_energia') | float) | round(3) }}' but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1
¿Igual es por este?
The normalized unit of sensor.home_energy_hourly (kWh) does not match the unit of already compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None
The unit of sensor.home_energy_cost_hourly (€) does not match the unit of already compiled statistics (None). Generation of long term statistics will be suppressed unless the unit changes back to None