This leads to switches turning on and off repeatedly.
It appears that input_text.list_device_power_on is never changing from 'none'.
Or:
{% set device_power = device_off[repeat.index - 1] %}
{% if device_power is number %}
{{ (device_power | int(0) + states(power) | int(0)) < states('input_number.load_shedding') | int(0) }}
{% else %}
true
{% endif %}
If device_power is not number, then this defaults to true. This would cause the issue.
This leads to switches turning on and off repeatedly.
It appears that input_text.list_device_power_on is never changing from 'none'.
Or:
If
device_poweris notnumber, then this defaults to true. This would cause the issue.