@eelan03 - I have also been trying to figure out how to trigger a notification for a low battery on my smoke detector but with no luck so far. Been trying to follow many of the examples but without success. If you happen to discover how to trigger a notification please share. Thanks
I added a sensor that is similar to what you show above and then added that sensor to a group thinking I could get the sensor to show the battery level in that group however the sensor is not showing. Should the example you provided show up on the UI with a battery level?
Ultimately I don’t know if there should be a fix but I have found that I receive these at startup and they do not cause any problems. My understanding is that this displays because the template (or maybe zwave?) hasn’t yet initialized. Once it has these errors stop and the template displays correctly in the UI.
They are initialization errors at startup and can be safely ignored unless they persist. They are caused by the fact that template sensors are initialized pretty quickly but if they rely on ZWave values, those may not be available for a minute or more as your ZWave network slowly initializes itself. In the meantime you may get hundreds of these errors. Annoying but not harmful.
For what it’s worth, it seems you can get rid of the warning WARNING:homeassistant.components.sensor.template:UndefinedError: 'None' has no attribute 'attributes'. The templating doc here contains the following example: