From 35f98e5808135f394586223f5d2bfb5f29e00e67 Mon Sep 17 00:00:00 2001 From: Marcel Vriend <92307684+marcelvriend@users.noreply.github.com> Date: Sun, 1 May 2022 19:16:34 +0200 Subject: [PATCH] Fix deprecated 'str for device registry entry_type' warnings --- custom_components/grocy/entity.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/grocy/entity.py b/custom_components/grocy/entity.py index 30a9750..adc1507 100644 --- a/custom_components/grocy/entity.py +++ b/custom_components/grocy/entity.py @@ -111,7 +111,7 @@ def device_info(self): "manufacturer": NAME, } # LEGACY can be removed when min HA version is 2021.12 - if MAJOR_VERSION >= 2021 and MINOR_VERSION >= 12: + if (MAJOR_VERSION > 2021) or (MAJOR_VERSION == 2021 and MINOR_VERSION >= 12): # pylint: disable=import-outside-toplevel from homeassistant.helpers.device_registry import DeviceEntryType