Devices with battery_alert_disabled set are not filtered out
Djebouh opened this issue · 2 comments
First, thanks for the package, very well done and useful.
My ios phones defined are coming with a "sensor.xxxxx_battery_level" sensor which is well detected by "automation.update_battery_status_group_members". On the other hand, I want to filter them out and they are not.
I think this is because the following condition " not is_state_attr(entity_id, 'battery_alert_disabled', true)" should apply to any item and not only to the ones with battery in their name. Indeed ios phones objects have a battery icon and are therefore matching
the condition "or 'battery' in item.attributes.icon | lower"
I aso think " not is_state_attr(entity_id, 'battery_alert_disabled', true)" should in fact test item.entity_id.
You shouldn't get alerts for them if you're using battery_alert_disabled, but they'll be in the group. Are you looking for a way to exclude them from the group too?
A fix to the item.entity_id issue was merged last night.