Skip to content

Home Assistant 2026.2.0 Template Error #158

@Piti8576

Description

@Piti8576

With the new Update from Home Assistant to 2026.2.0 I have a Template Error for all my Thermostats.

`Logger: homeassistant.components.automation.wohnzimmer_thermostatsteuerung
Quelle: components/automation/init.py:774
Integration: Automation (Dokumentation, Probleme)
Erstmals aufgetreten: 05:28:59 (1 Vorkommnis)
Zuletzt protokolliert: 05:28:59

Error rendering variables: ValueError: Template error: float got invalid input 'None' when rendering template '{% set n = namespace(dict=[]) %} {% if is_native_calibration_trigger and is_calibration_enabled %} {% for valve in valves_calibration_common %} {% set calibration_entity = device_entities(device_id(valve)) | expand | selectattr('domain','in','number') | selectattr('entity_id', 'search', input_calibration_key_word) | map(attribute='entity_id') | list | first | default(none) %} {% if calibration_entity is not none %} {% set fallback_min = iif('external' in calibration_entity, 0, -12)%} {% set fallback_max = iif('external' in calibration_entity, 50, 12)%} {% set calibration_entity_min = state_attr(calibration_entity,'min') | float(fallback_min) %} {% set calibration_entity_max = state_attr(calibration_entity,'max') | float(fallback_max) %} {% set calibration_entity_value_old = states(calibration_entity) | float(0) %} {% set local_temperature = value_temperature_sensor | float %} {% set calibration_entity_value_new = local_temperature %} {% set is_offset_entity = ('offset' in calibration_entity or 'calibration' in calibration_entity) and not ('external' in calibration_entity) %} {% set calibration_select = none %} {% if is_offset_entity %} {% set thermostat_temperature = state_attr(valve, 'current_temperature') | float %} {% set calibration_entity_value_new = (-(thermostat_temperature - local_temperature) + calibration_entity_value_old) %} {% else %} {% set calibration_select = device_entities(device_id(valve)) | expand | selectattr('domain','in','select') | selectattr('attributes.options', 'contains', 'external') | map(attribute='entity_id') | list | first | default(none) %} {% if calibration_select is none%} {% set calibration_select = device_entities(device_id(valve)) | expand | selectattr('domain','in','switch') | selectattr('entity_id', 'search', 'external_temperature_sensor') | map(attribute='entity_id') | list | first | default(none) %} {% endif %} {% endif %} {% set step = state_attr(calibration_entity, 'step') | float(1) %} {% if rounding_mode == 'manual' %} {% set step = input_calibration_step_size | float(1) %} {% endif %} {% if is_aggressive_mode_calibration %} {% set temp_diff = state_attr(valve,'temperature') | float(target_temperature) - local_temperature %} {% if temp_diff * factor < input_aggressive_mode_range * -1 %} {% set calibration_entity_value_new = calibration_entity_value_new + input_aggressive_mode_offset * factor %} {% elif temp_diff * factor > input_aggressive_mode_range %} {% set calibration_entity_value_new = calibration_entity_value_new - input_aggressive_mode_offset * factor %} {% endif %} {% endif %} {% if step <= 1 and calibration_entity_max | float < 1000 %} {% set round_size = iif('.' in (step | string), (step | string).split('.')[1] | length, 0) %} {% set calibration_entity_value_new = ((calibration_entity_value_new | float(0) / step) | round(0) * step) | round(round_size) | float %} {% else %} {% set calibration_entity_value_new = calibration_entity_value_new * 100 | int %} {% endif %} {% set calibration_entity_value_new = iif(calibration_entity_value_new > calibration_entity_max, calibration_entity_max, calibration_entity_value_new) %} {% set calibration_entity_value_new = iif(calibration_entity_value_new < calibration_entity_min, calibration_entity_min, calibration_entity_value_new) %} {% set is_min_difference = (float(calibration_entity_value_old) - float(calibration_entity_value_new)) | abs >= float(input_calibration_delta) %} {% set keep_alive = false %} {% if is_calibration_trigger and not is_min_difference and not is_offset_entity %} {% set last_updated = [calibration_entity] | expand | map(attribute='last_updated') | first %} {% set keep_alive = as_datetime(current_time_stamp) - timedelta(minutes=20) >= last_updated %} {% endif %} {% if is_min_difference or keep_alive %} {% set n.dict = n.dict + [(valve, [{ 'calibration_entity': calibration_entity, 'value': calibration_entity_value_new, 'select':calibration_select, 'value_old':calibration_entity_value_old }])] %} {% endif %} {% endif %} {% endfor %} {% endif %} {{ dict.from_keys(n.dict) }}' but no default was specified`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions