#Battery Alert Message
1 messages · Page 1 of 1 (latest)
I got everything showing up in the email except Battery Type.
Suggestions?
This is the code snippet. I realize it isn't in correct format but the original dpaste code above is
The {{ device_attr(entity, 'name_by_user') }} needs new batteries.
Area: {{ area_name(entity) }}
Device Name: {{ device_name(entity) }}
Battery Type: {{ battery_type(entity) }}
battery_type isn’t a thing
You can use what is defined in the docs. If you make stuff up it won’t work.
https://developers.home-assistant.io/docs/device_registry_index/
I was trying to get it to work with Battery Notes integration. I gave up and just going to settle getting the alerts for the device(s).
You may need to ask in #1284966582375813201 if you’re having an issue with that integration.
The code you posted in the dpaste looks fine; the code you posted in your next comment won’t work because there is no function battery_type()
Should work, if that integration adds this property to the device:
Battery Type: {{ device_attr(entity, 'battery_type') }}
Shouldn’t work because this function didn’t exist:
Battery Type: {{ battery_type(entity) }}