HA-Battery-Notes: Entities unavailable for sleeping devices

System Health details

System Information

version core-2024.6.4
installation_type Home Assistant Container
dev false
hassio false
docker true
user root
virtualenv false
python_version 3.12.2
os_name Linux
os_version 4.4.302+
arch x86_64
timezone Europe/Rome
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4989
Installed Version 1.34.0
Stage running
Available Repositories 1390
Downloaded Repositories 22
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 2
resources 12
views 14
mode storage
Recorder
oldest_recorder_run 19 giugno 2024 alle ore 19:53
current_recorder_run 28 giugno 2024 alle ore 19:17
estimated_db_size 972.75 MiB
database_engine sqlite
database_version 3.44.2
Spotify
api_endpoint_reachable ok

Checklist

  • I have added battery_notes: to my configuration.yaml and restarted.
  • I have read the FAQ’s.
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of any previous issues…

Describe the issue

Some device are not always connected and shows some entities as unavailable:

image

Should be “restore” entity so to avoid this issue.

Reproduction steps

  1. install Motion Shelly or any other sleeping device
  2. configure battery notes
  3. check all is fine
  4. wait for device to go sleeping
  5. recheck entities

Debug logs

No response

Diagnostics dump

No response

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 30 (24 by maintainers)

Most upvoted comments

Hi Andrew, thx so much for your help.

I hope to come back to you with more details about the issue in the next days, if still reproducible.

Version 2.10.8 just released has this extra logging in it, without these types of sensors to test it’s hard to work out what’s going on but hopefully the logging may glean something.

I also started using this integration just now and noticed that for a device of mine (Shelly H&T) the battery+ sensor is not created at all. For all other battery devices (shelly and non shelly) all is fine but for this specific device no battery+ is even created. I’m not sure this is the very same issue but I suspect it is. The percentage sensor included in the device seems ok:

Hi, this is a different issue, try removing the battery note, then the Shelly H&T from the Shelly integration, re-add the Shelly, then add the battery note.

I’ve seen it twice before, I think there was an issue some time ago with the Shelly integration where the battery entity wasn’t created quite right.

I’ll have a look at the code and see what I can add but I don’t think it does too much from memory. If it receives a numeric value from the listener it will set it.