-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Template loop detected #14
Comments
Hello! Thanks for the report! Yes, I have an idea. Please replace the following in the
Please do not forget to reload the config. |
Hi, Logger: homeassistant.components.template.template_entity Template loop detected while processing event: <Event state_changed[L]: entity_id=sensor.e3dc_battery_charge_power, old_state=<state sensor.e3dc_battery_charge_power=1107.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2023-12-31T11:08:49.955934+01:00>, new_state=<state sensor.e3dc_battery_charge_power=1011.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2023-12-31T11:08:49.958292+01:00>>, skipping template render for Template[{% set power = states('sensor.e3dc_battery_power') | float(0) %} {% if power >= 0 %} {{ power }} {% else %} {% set charge_power = states('sensor.e3dc_battery_charge_power') | float(0) %} {% if charge_power + power > 0 %} {{ charge_power + power }} {% else %} 0 {% endif %} {% endif %}] |
Ok Sorry, try this:
|
Thank you, tried it but again: Logger: homeassistant.components.template.template_entity Template loop detected while processing event: <Event state_changed[L]: entity_id=sensor.e3dc_battery_charge_power, old_state=<state sensor.e3dc_battery_charge_power=438.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2024-01-03T14:43:05.708230+01:00>, new_state=<state sensor.e3dc_battery_charge_power=330.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2024-01-03T14:43:05.713051+01:00>>, skipping template render for Template[{% set power = states('sensor.e3dc_battery_power') | float(0) %} {% set charge_power = states('sensor.e3dc_battery_charge_power') | float(0) %} {% if power >= 0 %} {{ power }} {% else %} {% set total_power = charge_power + power %} {{ total_power if total_power > 0 else 0 }} {% endif %}] |
Thanks for the great work! Your configuration works great, but sometimes i get the following error in HA logs:
2023-12-28 08:19:05.687 WARNING (MainThread) [homeassistant.components.template.template_entity] Template loop detected while processing event: <Event state_changed[L]: entity_id=sensor.e3dc_battery_charge_power, old_state=<state sensor.e3dc_battery_charge_power=39.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2023-12-28T08:19:05.598125+01:00>, new_state=<state sensor.e3dc_battery_charge_power=36.0; unit_of_measurement=W, device_class=power, friendly_name=E3DC Battery Charging Power @ 2023-12-28T08:19:05.608402+01:00>>, skipping template render for Template[{% set power = states('sensor.e3dc_battery_power') | float(0) %} {% if power >= 0 %}
{{ power }}
{% else %}
{% set charge_power = states('sensor.e3dc_battery_charge_power') | float(0) + power %}
{{ charge_power if charge_power > 0 else 0 }}
{% endif %}]
Any idea?
The text was updated successfully, but these errors were encountered: