Skip to content

battery_last_replaced attribute of new Battery Notes services defaulted to Home Assistant start time #4774

@rparenton

Description

@rparenton

Checklist

  • I have restarted Home Assistant after the HACS or manual install.
  • 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..

Battery Notes Version

3.4.6

Describe the issue

When creating new Battery Notes services for devices, the battery_last_replaced attributed on the various entities is set to the Home Assistant start time.

Image

This may be related to the fix for #4714 (PR #4715).

Reproduction steps

  1. Add a Battery Notes service for a newly discovered device
  2. Check the battery_last_replaced attribute in Developer Tools

System Health details

System Information

version core-2026.5.4
installation_type Home Assistant Container
dev false
hassio false
docker true
container_arch amd64
user root
virtualenv false
python_version 3.14.2
os_name Linux
os_version 4.18.0-553.121.1.el8_10.x86_64
arch x86_64
timezone America/Chicago
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 3130
Downloaded Repositories 17
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 6
resources 12
views 26
mode storage
Network Configuration
adapters lo (disabled), ens3 (enabled, default, auto)
ipv4_addresses lo (127.0.0.1/8), ens3 (10.2.97.3/24)
ipv6_addresses lo (::1/128), ens3 (fe80::7c67:fe0b:a347:b288/64)
announce_addresses 10.2.97.3, fe80::7c67:fe0b:a347:b288
Recorder
oldest_recorder_run May 9, 2026 at 10:54 PM
current_recorder_run May 23, 2026 at 2:16 PM
estimated_db_size 2549.94 MiB
database_engine mysql
database_version 10.3.39

Debug logs

2026-05-28 10:23:58.270 DEBUG (MainThread) [custom_components.battery_notes.coordinator] sensor.m100111908_battery low threshold set at 10
2026-05-28 10:23:58.270 DEBUG (MainThread) [custom_components.battery_notes.coordinator] Defaulting 9b851bdd1c91681f80aa827debd5dee3 battery last replaced to 2026-05-23 19:18:51.237041+00:00
2026-05-28 10:23:58.270 DEBUG (MainThread) [custom_components.battery_notes.coordinator] Defaulting 9b851bdd1c91681f80aa827debd5dee3 battery last reported to 2026-05-28 15:23:58.270589+00:00

Diagnostics dump

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions