From 3d8cb5f76c83b2d7ebefc9093a99589b684088f5 Mon Sep 17 00:00:00 2001 From: Tomer <57483589+tomer-w@users.noreply.github.com> Date: Sat, 26 Oct 2024 20:37:13 +0300 Subject: [PATCH] Add version tracing on startup (#311) * Add version tracing on startup --- custom_components/rpi_gpio/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/custom_components/rpi_gpio/__init__.py b/custom_components/rpi_gpio/__init__.py index 2ec95d7..f6a4eed 100644 --- a/custom_components/rpi_gpio/__init__.py +++ b/custom_components/rpi_gpio/__init__.py @@ -25,6 +25,8 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: """Set up the GPIO component.""" + version = getattr(hass.data["integrations"][DOMAIN], "version", 0) + _LOGGER.debug(f"{DOMAIN} integration starting. Version: {version}") path = config.get(DOMAIN, {}).get(CONF_PATH) hub = Hub(hass, path) hass.data[DOMAIN] = hub