Hello,
Thank you very much for this great blueprint.
I have some actors that do not report percentages but give a “false” when the battery level is low.
Are these actors also included in this blueprint?
Thank you in advance.
Hello,
Thank you very much for this great blueprint.
I have some actors that do not report percentages but give a “false” when the battery level is low.
Are these actors also included in this blueprint?
Thank you in advance.
Hello Blacky,
Thanks for this great blueprint.
I’m trying to get the custom actions only if the battery level is low, but I can’t see how to do this. Whenever the automation is running, the custom action also runs.
Did i miss something ?
Firstly welcome to the community
Your welcome.
Normally when the battery goes low the state is ON. Yes this is included but I have just found a bug that would not allow the automation to run when your battery was low. It has been fixed and updated now. Please update the blueprint to version 1.5 and let us know if this has resolved the problem.
Blacky
There was a bug in the blueprint, please update it and if you like you can now use the easy notify. I will do a FAQ on how to use the custom actions.
Blacky
FAQ - How do I use the sensors in custom actions
Below are some examples on how to use the custom actions to send a message. To do this add action / call service / start typing “Notifications” in the service text box and select your mobile device. Add a title and in the message copy one of the sensors an paste it in. Then keep editing.
1 - Use of sensors names in a message.
You just replace the sensor name to the one you would like to use.
service: notify.mobile_app_blacky_iphone
data:
title: Low Battery Notification
message: "{{sensors_names}} all have a low battery level and it is time to replace them"
2 - This will report the sensors one after the other
You just replace the sensor name to the one you would like to use.
service: notify.mobile_app_blacky_iphone
data:
title: Low Battery Notification
message: "{{all_sensors}}"
They will be like this in your message;
sensor 1, sensor 2, sensor 3, etc
3 - This will use a new line per sensor
You just replace the sensor name to the one you would like to use.
service: notify.mobile_app_blacky_iphone
data:
title: Low Battery Notification
message: "{{all_sensors|replace(', ', '\n')}}"
They will be like this in your message;
sensor 1
sensor 2
sensor 3
etc
4 - This will use a new line per sensor using two sensors
You just replace the sensor name to the one you would like to use.
message: "{{all_sensors|replace(', ', '\n')}}{{'\n'}}{{all_sensors_custom_group|replace(', ', '\n')}}"
They will be like this in your message;
all_sensor 1
all_sensor 2
all_sensor 3
etc
all_sensors_custom_group 1
all_sensors_custom_group 2
etc
5 - These are conditions for checking if there are any sensors to report
You just replace the sensor name to the one you would like to use.
This one will check if there are any sensors and if none then it will be true.
{{ all_sensors == '' }}
This one will check if there are any sensors and if there are some to report then it will be true.
{{ not all_sensors == '' }}
6 - This is an “if / then + else” action
This example is if you would like to receive a okay confirmation message if there are no batteries to report and if there are batteries to report it will list them.
You just replace the sensor name to the one you would like to use.
First we select a ‘If-then’ action. Click ‘+ ADD ACTION’, then start typing ‘If-then’ and the action will pop up… select it.
Then add the condition by adding in a template condition to check if there are any sensors to notify. Click ‘+ ADD CONDITION’, then type ‘template’ and select it. Then add the code below.
Note: See example 5 above for condition explanation.
{{ all_sensors == '' }}
If the condition was true (no sensors to report) then we send this okay confirmation message. In ‘Then’, Click on ‘+ ADD ACTION’, then type ‘notification’ and select the notification you would like.
If the condition was false (sensors to report) then we send this message with all the sensors that have low battery level. Click on ‘Add else’ then ‘+ ADD ACTION’, then type ‘notification’ and select the notification you would like.
7 - This is an “if / then” action
This example is if you would like to receive a message only when there are low battery sensors to report.
You just replace the sensor name to the one you would like to use.
First we select a ‘If-then’ action. Click ‘+ ADD ACTION’, then start typing ‘If-then’ and the action will pop up… select it.
Then add the condition by adding in a template condition to check if there are any sensors to notify. Click ‘+ ADD CONDITION’, then type ‘template’ and select it. Then add the code below.
Note: See example 5 above for condition explanation.
{{ not all_sensors == '' }}
If the condition was true (sensors to report) then we send this message with all the sensors. In ‘Then’, Click on ‘+ ADD ACTION’, then type ‘notification’ and select the notification you would like.
NOTE: If there was no sensor to report then we wouldn’t get a message.
8 - If you would like to have a bullet point or any other symbol before each sensor
You just replace the sensor name to the one you would like to use.
message: |-
• {{all_sensors|replace(', ', '
• ')}}
or
message: "• {{all_sensors|replace(', ', '\n• ')}}"
9 - If you would like to have a bracket around the battery %, Low reading and unavailable
You just replace the sensor name to the one you would like to use.
You don’t have to use every “replace” as it just depending on what sensor you are using and how you construct your message, but it will give you some information / guide on what you can do.
message: "{{all_sensors|replace('@ ', '(')|replace('is ', '(')|replace(', ', ')\\n')}})"
Enjoy
Blacky
Back to FAQ: Click Here
Please update without delay ASAP
Bugs Fixes
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
@Blacky
Great your FAQ on how to use the custom actions.
It works really well, I can now turn on my alert button in the dashboard.
Thanks
FAQ - How to change the reported battery name in a message
In this example we will add the battery type to the name but you can change it to anything you like that helps you identify the battery entity to your liking.
Go into settings / devices & services / click on the entities tab at the top and search for your batteries. Click on the entity you would like to update and then the cog wheel
Change the name to your liking and click update.
When you receive a message the name will now be reflected as per your liking.
You can also adjust the sensor display precision. If your sensor % is reading 30.001% you can adjust the display precision so it will read 30% by select the drop-down menu in display precision.
Enjoy
Blacky
Back to FAQ: Click Here
Thanks for the well thought-out blueprint.
One thing I would suggest is to round battery percent values. I have battery sensors outputting values like 11.9999%. It makes notification bubbles quite cluttered.
Thanks for your kind words.
This is all done in HA. In your battery entity look for sensor display precision. For me I dont have any decimal places. Above your post shows you how to get to this area in HA.
Blacky
When updating to version 1.6 - If you are using the “Battery Sensors - Custom Group” option then you will need to select and adjust the new input for “Custom Group - Battery Low Warning Level”.
New Feature
Battery Sensors - Custom Group - The custom group has its own independent “Battery Low Warning Level” setting.
Use case: You may have a few batteries that require a different low battery warning level. Some devices may require you to replace / charge your batteries at a higher battery % so it can operate correctly. Some devices can still operate at less than 5% battery. Before you would have to have 2 automations to achieve this. This can now be set up in the one automation using the "“Battery Sensors - Custom Group” with its own independent “Custom Group - Battery Low Warning Level” setting.
Easy Notify - Sensor Selection - Easy notify now allows you to select a new option if you would like to use “Use All Battery Sensors Minus Excluded Battery Sensors + Custom Group”
If you like this blueprint? Consider hitting the button in the top post
If you like my blueprints, and would like to show your support or just say thank you? Click Here
Enjoy
Blacky
@Blacky it seems the import of this blueprint isnt working anymore?
the link: https://gist.github.com/Blackshome/4010fb83bb8c19b5fa1425526c6ff0e2
gives a 404:
@matrover @SKAL @Alwin_Hummels
Thanks for the heads up.
Everything is back up and running, please try again.
Thanks for your patience.
Blacky
Hi Blacky,
great blueprint you created. What would be very practical in the notifications is to specify the area of the device in the text. Maybe you can integrate this as an option in the blueprint.
Something like that:
{{ device_attr(device_id(trigger.entity_id), ‘name’) }} im Bereich ({{ area_name(trigger.entity_id) }})
And the last thing is the trigger options. It would be perfect if the automation were also triggered automatically when a device enters the status of too little charge, is not available or is low. A quick reaction is often necessary, especially with heating thermostats. Binary sensor that triggers if any battery level goes beyond a threshold (broken in 2022.09)
Best regards
Welcome to the community.
Thanks for your suggestion.
I am not following, What state is “too little charge”. Some batties report a “Low” state. The “Low” state = “on” in HA so that has been covered. What state do your “heating thermostats” report?
Blacky
@Blacky I always get excited when I see your avatar on a blueprint.
You sir, are a legend. Thank you very much for all your efforts in this community!
I just found your donation link, enjoy a brew on me.
Cheers!
Great blueprint as always. Could we possibly have NotificationChannel support for Android users? thanks