I want to set input_number.rollo_manuell_betaetigt by binary code (eg 1= cover 1; 2=cover 2, 4=Cover3…) triggered by the change of state of the cover (if somebody has manually changed the cover).
My idea is to use the id of the trigger for setting the input_number.
but I did not find a way use it - how can I user the id of the trigger as value inside the value calculation?
states(“input_number.rollo_manuell_betaetigt”)|int + id|int
Or is there another way to do it?
trigger.id seems to create an error:
Fehler: Error rendering data template: UndefinedError: ‘dict object’ has no attribute ‘id’
it looks like trigger has no attribute id
2024-05-11 18:10:26.559 ERROR (MainThread) [homeassistant.components.automation.rollo_mauell_betaetigt] rollo_mauell_betaetigt: Error executing script. Error for call_service at pos 1: Error rendering data template: UndefinedError: 'dict object' has no attribute 'id'
2024-05-11 18:10:26.568 ERROR (MainThread) [homeassistant.components.automation.rollo_mauell_betaetigt] Error while executing automation automation.rollo_mauell_betaetigt: Error rendering data template: UndefinedError: 'dict object' has no attribute 'id'
If you attempt to test the automation by executing its Run command, the trigger variable will be undefined (and produce an error message regarding trigger.id).
The trigger variable only exists when the automation is triggered by one of its triggers.