StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
615 stars 111 forks source link

[BUG] #755

Open lka opened 1 year ago

lka commented 1 year ago

Environment

Describe the bug

Each time I restart HA then I get a warning in the logs that restore_state.RestoreStateData.async_get_instance is deprecated, and not intended to be called by custom components; at custom_components/shelly/init.py, line 395: data = await RestoreStateData.async_get_instance(self.hass)

Steps to Reproduce

restart Homeassistant then have a look at the logs

Expected behavior

Screenshots

Traceback/Error logs


2023-06-17 12:29:43.932 WARNING (MainThread) [homeassistant.helpers.frame] Detected integration that restore_state.RestoreStateData.async_get_instance is deprecated, and not intended to be called by custom components; Pleaserefactor your code to use RestoreEntity instead; restore_state.async_get(hass) can be used in the meantime. Please report issue to the custom integration author for shelly using this method at custom_components/shelly/__init__.py, line 395: data = await RestoreStateData.async_get_instance(self.hass)

Additional context

dadozts commented 1 year ago

I have the same problem, but the system seems to work fine