home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.08k stars 30.57k forks source link

Lost and renamed entities after reboot #87797

Closed RoboMagus closed 1 year ago

RoboMagus commented 1 year ago

The problem

Not the first time it happened, so there's got to be a bug somewhere.

After a reboot of HomeAssistant (not an upgrade or anything, just a shutdown & startup of my RPi4 to change power supplies), I noticed a bunch of entities having become unavailable. Looking into it the same entities that have become unavailable now exist with an _2 added to it.

This time it appears only to affect some ESPHome stuff, but previously this affected my energy metering (#79895, #81391).

What version of Home Assistant Core has the issue?

core-2023.2.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant Container

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet

No response

Anything in the logs that might be useful for us?

[...]

2023-02-09 10:16:18.977 INFO (MainThread) [custom_components.hacs] Enable category: plugin
2023-02-09 10:16:18.977 INFO (MainThread) [custom_components.hacs] Enable category: python_script
2023-02-09 10:16:18.978 INFO (MainThread) [custom_components.hacs] Enable category: theme
2023-02-09 10:16:18.981 INFO (MainThread) [custom_components.hacs] Enable category: appdaemon
2023-02-09 10:16:19.006 INFO (MainThread) [custom_components.hacs] Setting up themes endpoint
2023-02-09 10:16:19.023 INFO (MainThread) [custom_components.hacs] Setting up plugin endpoint
2023-02-09 10:16:19.023 INFO (MainThread) [custom_components.hacs] <HacsFrontend> yaml mode, cache for /hacsfiles/: False
2023-02-09 10:16:19.042 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform ping is taking over 10 seconds.
2023-02-09 10:16:19.045 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform command_line is taking over 10 seconds.
2023-02-09 10:16:19.058 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform command_line is taking over 10 seconds.
2023-02-09 10:16:19.059 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform command_line is taking over 10 seconds.
2023-02-09 10:16:19.060 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform meteoalarm is taking over 10 seconds.
2023-02-09 10:16:19.061 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform workday is taking over 10 seconds.
2023-02-09 10:16:19.065 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform utility_meter is taking over 10 seconds.
2023-02-09 10:16:19.088 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform thermal_comfort is taking over 10 seconds.
2023-02-09 10:16:19.102 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform energy is taking over 10 seconds.
2023-02-09 10:16:19.107 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform nextcloud is taking over 10 seconds.
2023-02-09 10:16:19.137 WARNING (MainThread) [homeassistant.components.sensor] Setup of sensor platform monitor_docker is taking over 10 seconds.
2023-02-09 10:16:19.492 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new button.esphome entity: button.pond_monitor_restart_2
2023-02-09 10:16:19.496 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new button.esphome entity: button.reset_vl53l0x_addresses_2
2023-02-09 10:16:19.516 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_restart_count_2
2023-02-09 10:16:19.524 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_tds_2
2023-02-09 10:16:19.530 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_turbidity_2
2023-02-09 10:16:19.537 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_filter_pressure_2
2023-02-09 10:16:19.572 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_waterlevel_1_2
2023-02-09 10:16:19.579 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_waterlevel_2_2
2023-02-09 10:16:19.594 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_ads1115_a0_2
2023-02-09 10:16:19.598 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_ads1115_a1_2
2023-02-09 10:16:19.601 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_ads1115_a2_2
2023-02-09 10:16:19.605 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_ads1115_a3_2
2023-02-09 10:16:19.621 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.pond_monitor_device_info_2
2023-02-09 10:16:19.969 INFO (MainThread) [homeassistant.components.sensor] Setting up sensor.hacs
2023-02-09 10:16:20.012 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform version is taking over 10 seconds.
2023-02-09 10:16:20.022 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform withings is taking over 10 seconds.
2023-02-09 10:16:20.037 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform tado is taking over 10 seconds.
2023-02-09 10:16:20.056 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform mobile_app is taking over 10 seconds.
2023-02-09 10:16:20.065 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform mobile_app is taking over 10 seconds.
2023-02-09 10:16:20.066 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform mobile_app is taking over 10 seconds.
2023-02-09 10:16:22.783 INFO (MainThread) [custom_components.watchman] Watchman started [0.6.1]
2023-02-09 10:16:23.051 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new switch.esphome entity: switch.blitzwolf_2_relay_2
2023-02-09 10:16:23.055 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new button.esphome entity: button.blitzwolf_2_restart_2
2023-02-09 10:16:23.065 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.blitzwolf_2_voltage_2
2023-02-09 10:16:23.068 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.blitzwolf_2_amperage_2
2023-02-09 10:16:23.074 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.blitzwolf_2_power_2
2023-02-09 10:16:23.077 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.blitzwolf_2_total_daily_energy_2
2023-02-09 10:16:23.084 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new sensor.esphome entity: sensor.blitzwolf_2_energy_2
2023-02-09 10:16:23.115 INFO (MainThread) [homeassistant.helpers.entity_registry] Registered new binary_sensor.esphome entity: binary_sensor.blitzwolf_2_button_2
2023-02-09 10:16:24.068 INFO (MainThread) [homeassistant.setup] Setup of domain device_tracker took 46.5 seconds
2023-02-09 10:16:24.181 WARNING (MainThread) [aioesphomeapi.reconnect_logic] Can't connect to ESPHome API for esp32-cam @ 192.168.1.63: Error connecting to ('192.168.1.63', 6053): [Errno 113] Connect call failed ('192.168.1.63', 6053)
2023-02-09 10:16:24.274 WARNING (MainThread) [homeassistant.components.buienradar.util] Unable to retrieve json data from Buienradar (Msg: , status: None)
2023-02-09 10:16:24.317 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform nextcloud is taking over 10 seconds.
2023-02-09 10:16:24.320 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform template is taking over 10 seconds.
2023-02-09 10:16:24.581 INFO (MainThread) [aioesphomeapi.reconnect_logic] Trying to reconnect to esp32-cam @ 192.168.1.63 in the background

[...]

Additional information

I'd like to debug this further, but as it's not really something that can be reproduced and the logs don't show anything interesting as to Why these entities are rediscovered as "new" this leaves me with nothing to go on.

EDIT:

When attempting to clean up renamed entities I came accross this issue affecting nextcloud sensors as well: image

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.