I have several Battery Devices (Zigbee and Z-Wave). Is there a way to create a Virtual or Custom Device that would include the original devices sensor.NAME_battery, Device Name, Last Value, Last Value Date? Then I want to put them in a list, sort of like a Group, so I can schedule a script to run once an hour that would check if the Current Value is not equal to the Last Value for each item in the list, then update the Last Value and Last Value Date, then call another script passing the Current Value and Device Name which will compare the Value and if below a threshold notify me.
The general functions you are looking for can be handled with Templating and Template Sensors. However, your proposed method seems really inefficient.
Search these forums for “low battery notification”… there are multiple exisitng blueprints and automations for this kind of thing.
Drew, thanks for the reply.
I have looked at several blueprints and other things people have done. The reason I want to poll the device is because I created an automation to trigger when the battery level changed to run a script and check the threshold and notify me. But 2 of the device dropped by 1 percent each and the automation did not trigger. I am not sure if it was the way I wrote the automation or the change does not generate a trigger. So I started trying to come up with another solution. I will keep researching to find a solution that I think will fit my needs.
Jack, post the automation/script you have so far.