#Battery Alert Message

1 messages · Page 1 of 1 (latest)

fallen snow
#

need some assistance from someone smarter than me.
I have the following code but the results give me. I'm getting the mail but not the additional attributes

The laundry motion needs new batteries.
Battery Type: None
Device Name: None

https://dpaste.org/rxw6w

fallen snow
#

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) }}

rigid vale
#

battery_type isn’t a thing

fallen snow
rigid vale
# fallen snow I was trying to get it to work with Battery Notes integration. I gave up and ju...

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) }}