What it means
A template used a variable or attribute that does not exist at that moment, and rendered it as empty.
Why it happens
- The automation was run by hand (Run actions) or by another trigger type, so trigger.to_state does not exist.
- A typo in an attribute name, or the entity has no such attribute.
- The entity is unavailable and has no attributes yet.
How to fix it
- Guard the template: {{ trigger.to_state.state if trigger.to_state is defined else "" }}.
- Check the attribute names in Developer tools → States.
- Test the template in Developer tools → Template.
Useful tools
Other Home Assistant errors
- A request from a reverse proxy was received from 172.30.33.0, but your HTTP integration is
- Received X-Forwarded-For header from an untrusted proxy 172.18.0.2
- Login attempt or request with invalid authentication from 192.168.1.50 (192.168.1.50). Req
- Invalid config for 'automation' at automations.yaml, line 3: required key 'triggers' not p
- Setup failed for 'hacs': Integration not found.