From 8363fb1d0dd5b601f50d80e42ba4c7f6dbe1ea13 Mon Sep 17 00:00:00 2001 From: Alex X Date: Sat, 7 Sep 2024 17:02:42 +0300 Subject: [PATCH] Fix deprecated hass.helpers #1434 --- custom_components/sonoff/system_health.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/custom_components/sonoff/system_health.py b/custom_components/sonoff/system_health.py index ea26695..3164e22 100644 --- a/custom_components/sonoff/system_health.py +++ b/custom_components/sonoff/system_health.py @@ -12,6 +12,7 @@ from homeassistant.components import system_health from homeassistant.components.http import HomeAssistantView from homeassistant.core import HomeAssistant, callback +from homeassistant.helpers.system_info import async_get_system_info from .core import xutils from .core.const import DOMAIN, PRIVATE_KEYS @@ -63,7 +64,7 @@ async def setup_debug(hass: HomeAssistant, logger: Logger): source_hash = await hass.async_add_executor_job(xutils.source_hash) integration = hass.data["integrations"][DOMAIN] - info = await hass.helpers.system_info.async_get_system_info() + info = await async_get_system_info(hass) info[DOMAIN + "_version"] = f"{integration.version} ({source_hash})" logger.debug(f"SysInfo: {info}")