đŸȘ« Low Battery Notifications & Actions

@Blacky thanks for that, my smoke alarms didn’t have that device_class: battery, added as per instruction and they show up now :partying_face:

I am wondering now: the state reported isn’t a percentage but “high” - will that even work?

Adding the battery device class did the trick for my Tuya devices. Now I just hope your blueprint works with battery entities that report “high, middle,” and “low” rather than a percentage. :slight_smile:

Thanks!

Without manually creating a group and adding new device each time, is there a way I can exclude all powercalc battery sensors globally?

@SaaX

You can also test it in developer tools. Follow the same steps as before but this time in the state you will see high type in low and press set state again. Now you forced the state to low, run the automation and it should report that battery. Once you confirmed this just go back into developer tools and set the state back to high. The blueprint will report batteries that have a state of low or on.

Could you also do a test for me and reboot you Home Assistant and check if the device_class: battery has sicked to your entities?

Blacky :grinning:

@ancjsd

See post above this one again.

Blacky :grinning:

@iona

You should check with the developer of that integration as they may have a way to do this or develop a way as they have Configuration options. It would be nice to have this configuration option if it creating battery sensors.

powercalc:
  create_battery_sensors: false

But I have no idea what the integration does.

Failing that you could try a Home Assistant core configuration option, click here.

I have not tested this but you have an option to use customize_glob in your configuration.yaml file. So you can try this at your own risk if you like. Maybe edit it to your liking. If it works then just enable the Exclude Hidden Battery Sensors in Battery Sensors

homeassistant:
  customize_glob:
    "sensor.powercalc_*_battery_level":
      hidden: true

Blacky :grinning:

@Blacky ok, first thing: I didn’t restart HA since adding device_class: battery yesterday - but it didn’t stick, it was gone this morning. I can’t say when that happened.

I did set state to low just now and ran the automation, it didn’t report on that. Is there anything I else I can do to narrow it down?

Also did a HA restart as requested, device_class: battery was gone after that :cry:

@SaaX

I thought that would be the case.

This could be a Tuya thing. I don’t use Tuya but they should be adding a device class to the battery sensors. Maybe this is something for Tuya or HA. Are you able to do a Tuya update?

Blacky :grinning:

@blacky yeah, that Tuya rubbish has to go, probably going to replace the smoke alarms with Shelly ones and that’ll be it, no more cloud dependencies :partying_face:

Thanks a lot for trying to help :heart:

@SaaX

I have Shelly ones, they are basic and the only thing I would love to have is a mute button or something on those lines (acknowledge button maybe). Here is what you will get.

Blacky :grinning:

That’s looking much better than my Tuya @#$% :laughing:

A big pro for the Shellys is: they’re using the same CR123A batteries and I have 20 spares. Pity the Shellys aren’t a bit cheaper, I need 6 :disappointed: It is what it is, I suppose


1 Like

I think there’s a misunderstanding. I’m asking for a blueprint-level option to exclude only Powercalc battery sensors, not to hide or disable them globally in HA.

Currently, I can only use areas/labels/entities and devices, which means I have to manually add new devices within the group if I want to use ‘Excluded Battery Sensors’ section. If there was an option via the blueprint to use templating, I can potentially use a global variable method to exclude all sensor.powercalc_*_battery_level sensors with a single line.

Hope this makes sense?

I had the same result with my Tuya temp sensors–the device class: battery was gone after restarting HA. I ended up creating a template sensor with that device class and using an automation that calls a python script to automatically set the templated sensor to the same state as the Tuya sensor.

good thinking there, thanks :wink:

@iona

You will need to use labels. It easy to do and you can apply them all at once. If and when you add a new device and forget to attache the label then it’s not the end of the world if it shows up in your notification twice
 just add it then.

To do this and it will take about 1 minute

  1. Go to Settings > Devices & services > Entities (tab at the top) and search for your text powercalc battery.
  2. All matching entities will be shown. Enter Selection Mode (using the selection icon).
  3. Select the entities you want, making sure you don’t accidentally include ones that just happen to share the same text (this is the key advantage over blind text matching).
  4. In the top right, choose Add label or use the ⋼ menu to hide them in one step. Add a label Powercalc Battery and they will all be done together in one hit.
  5. In the blueprint, under Battery Settings, select that label and your done.

I would go back to the developer of powercalc and ask him to include an option to exclude battery levels. I not sure why they are even including them as it looks like it for energy used for lights and switches not battery power (battery just don’t change like that) but again I have no idea of that integration. If you ask him nicely then he may add it in for you. As my previous post they have Configuration options and are still actively developing it.

Blacky :grinning:

@ancjsd

That will work.

I would also reach out to the developers of HA Tuya and ask them to automatically apply the device_class: battery to the battery entities. This is a no brainier for them and they will probably do it.

Blacky :grinning:

Hello! This is an AMAZING blueprint.
Definitely saves my a lot of headaches hunting down dead devices
 :wink:

Can I suggest to allow the “easy notification device” to allow sending to a notification service instead of only instance of HA apps?
In my case, this would allow me to easily route my notification to a telegram service instead of using a custom action.

@EPinci

Thanks for your suggestion. There are a lot of different notification services, hopefully the custom action is a quick way to send you telegram. In the link under the custom action it gives you some examples.

Blacky :grinning:

Appreciate the reply, but just realised I mixed the integrations. I meant to say battery-notes, not powercalc. :sweat_smile: It includes batter plus ‘+’ and battery low sensors.

Also, the label method is still a manual process. I was looking something that set and forget using template variables. I gather you can’t implement such function?

I’m new to HA. I don’t see how you associate this button with your Low Battery notifications blueprint.

Thank you, this is an excellent low battery blueprint!