I recently updated HA to version 106.2 (coming from 102.0).
Since this update one of the data_templates in my automations stopped working:
- id: blinds_set_tilt
alias: Blind tilting
mode: parallel
max: 4
trigger:
- platform: state
entity_id: input_number.blind_1_tilt
- platform: state
entity_id: input_number.blind_2_tilt
- platform: state
entity_id: input_number.blind_3_tilt
- platform: state
entity_id: input_number.blind_4_tilt
action:
- service: ads.write_data_by_name
data_template:
adsvar: "{{ trigger.to_state.attributes.adsvar }}"
adstype: byte
value: "{{ trigger.to_state.state | int }}"
The input_number of each blind as a custom attribute assigned to it.
The friendly name of this attribute is adsvar, the value contains the ADS variable it needs to write to.
This worked perfectly in the previous version, but since the upgrade it stopped working.
The template
"{{ trigger.to_state.attributes.adsvar }}"
Doesn’t return any value anymore. Just ‘None’ in the logs.
What causes this?