battery_notes_battery_not_reported
Not firing?
#2223
-
Hi, awesome integration! I'm trying to test to make sure my Battery Notes related notification automations are working, and while the low battery notification works fine, I'm having issues with the "battery not reported" condition". I have a device that I already know is dead, and has been since before I added the integration, that I wanted to test with. It's my understanding from #2193 and: that a device with a last reported date of "Unknown" will never be considered "out of date". So, I used Developer tools to force an older date onto the device state, with the result being:
I then ran:
...and my automation never triggered:
To try and take as much out of the picture as possible, I enabled debug logging and ran the action/service again. I do see:
but never the expected log entry for when the HA-Battery-Notes/custom_components/battery_notes/__init__.py Lines 394 to 398 in 462d46a Am I doing something wrong? The only thing I can think of is that the integration somehow stores a copy of the device state and only updates it so often, ignoring the override of the date I'm setting via Developer tools, and that the issue is indeed that "Unknown" will never trigger these events. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
You are correct in that the integration stores a copy of some of the device state, and since your device last seen is unknown at the start it won't trigger the event. The data is stored in your config/.storage/battery_notes.storage file This is an interesting problem, I wonder if it should default a last seen to the day you add it so you get these events raised, whilst my issue #2193 is for the date last replaced defaulting it is in the same area so I'll think and investigate both together. |
Beta Was this translation helpful? Give feedback.
-
Version 2.3 adds support for this so closing this as complete. |
Beta Was this translation helpful? Give feedback.
Version 2.3 adds support for this so closing this as complete.