Howto create battery alert without creating a template for every device

Coming back to this “removing battery” topic - I can’t get it to work either. HA somehow found my iphone and this plugin keeps telling me the battery is empty. I have:

  • Added the customize section to the for every version of what I think the sensor is called (sensor.my_ipad_mini_battery_level, sensor.my_ipad_mini_battery, sensor.my_ipad_mini) all on separate lines.
  • I’ve tried the delete box on the “Battery Alert” card
  • Installed MQTT Explorer - but I can’t find any sensors in there…

Any further suggestions would be appreciated.

check in states for anything with an attribute called delete_battery_sensor and let us know…

Thanks @walaj - there 5 of them which include that, here is one of them - do you need other info?

so delete that one, paste it into the “Delete a Battery Sensor” field

homeassistant/sensor/leons_iphone_battery

and press enter. This will delete it. However you will also need to make sure that battery_sensor_creation_disabled is added to device_tracker.leons_iphone

(I think)

Hello,

I followed the documentation but I get this error (see below). Anyone has an idea? I checked it but I copied everything correctly. Google also doesn’t help.

Logger: homeassistant.components.hassio
Source: components/hassio/init.py:365
Integration: Hass.io (documentation, issues)
First occurred: 22:59:11 (2 occurrences)
Last logged: 23:11:29

Invalid config for [group]: [view] is an invalid option for [group]. Check: group->group->battery_view->view. (See ?, line ?).

Remove any lines of code under the group: section that include view:

Yeah just saw it 1 min after posting it. Thank you. Same goes for control: hidden.

Thank you Dave.

Fantastic project! Got it installed and running after commenting out the view: yes and control: hidden lines. 2 issues though…

  1. Not all of my battery statuses are showing in the default card on my Overview page:

    group.battery_status:
entity_id:
  - sensor.4in1_pir_sensor_battery_level
  - sensor.4in1_pir_sensor_battery_level_2
  - sensor.4in1_pir_sensor_battery_level_3
  - sensor.bedroom_blind_battery_level
  - sensor.ecolink_garage_door_tilt_sensor_battery_level
  - sensor.front_timer_battery_level
  - sensor.iblinds_window_blind_controller_battery_level
  - sensor.illumination_sensor_battery_level
  - sensor.kitchen_blind_2_battery_level
  - sensor.kitchen_blind_3_battery_level
  - sensor.living_room_window_blind_battery_level
  - sensor.lumi_lumi_sen_ill_mgl01_power
  - sensor.lumi_lumi_sensor_motion_38216304_power
  - sensor.lumi_lumi_sensor_motion_aq2_19bc3f05_power
  - sensor.lumi_lumi_sensor_motion_aq2_68988604_power
  - sensor.lumi_lumi_sensor_motion_aq2_a2154d04_power
  - sensor.lumi_lumi_sensor_motion_aq2_power
  - sensor.patio_door_blind_battery_level
  - sensor.rear_timer_battery_level
  - sensor.smartcode_10_touchpad_electronic_deadbolt_battery_level
  - sensor.vog_l04_battery_health
  - sensor.vog_l04_battery_level
  - sensor.vog_l04_battery_state
  - sensor.vog_l04_charger_type
  - sensor.zm1701_electronic_deadbolt_door_lock_without_handle_battery_level
order: 2
  1. I’m not seeing anything published in MQTT. Is this normal at first?

I suspect these are auto generated battery sensors from HA rather than the battery.

The battery sensors created by the package have the name sensor.<item>_battery

The package created the group battery_status that contains the above 25 entities from HA but the automatic card for “Battery Status” group on my still default Overview page is not showing them all, only 12. I have other groups on the Overview page that contain far more than 12 entities (i.e. Input Boolean, Switch, etc.)

I’m not seeing any additional sensors created by the package.

I am getting an alert for the sensor.rear_timer_battery_level which is at 26%…

ok - so perhaps it is happy to use the existing battery level objects.

what do you get in states?!
Capture|690x281

I haven’t played with this for a while but if you are using LoveLace you can just add them yourself to the dashboard.

I do not see any sensors that look like that!

Yes, that’s what I’ve done. It’s just that my Lovelace Overview page is still the Default which auto-populates all entities in the system, except it’s not listing all 25 entities that are in the group battery_status. I don’t have any other group with more than 12 entities (areas yes, and they are okay) so maybe it’s some sort of HA/Lovelace limitation with groups…
Now that I’m comfortable finding my way around HA, it’s about time for me to change the overview page and not use the default as it has become very large, somewhat slow to fully load, and just generally unwieldy.

Can you put this into HACS? https://hacs.xyz/

That way we could update in Home Assistant.

1 Like

Sorry if I’ve missed it somewhere, but is there anyway to set a custom (or different) threshold for certain entities?

From what I’ve read, I want to be alerted when my Wyze sensors report 85% on their batteries, but I don’t want to set the battery warning to 85% for everything (several other sensors have been working down to 50%).

I setup automations to send me a notification to my phone when any of my wyze sensor batteries are lower than 86%. I also use the custom battery entity row card to display it on my lovelace system card.

No. It’s one rule for all.

With the battery entity row card there is.