From f535dcd536b9206cbb96103604676bff83233614 Mon Sep 17 00:00:00 2001 From: Jan Seidl Date: Thu, 29 Feb 2024 15:10:44 -0800 Subject: [PATCH] Adding back feature enable check to climate groups (#321) * added back feature enabling check * Adding Area default values for parameters that will be required in future versions (#322) * adding default values for parameters that will be required in future versions * correct labels from label and changed default from None to set() as expected * added introspection so we can make defaults available before the function in HA has the parameter available * added back feature enabling check --- custom_components/magic_areas/climate.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/custom_components/magic_areas/climate.py b/custom_components/magic_areas/climate.py index 7c7f1fae..1c68d4dc 100644 --- a/custom_components/magic_areas/climate.py +++ b/custom_components/magic_areas/climate.py @@ -109,6 +109,11 @@ async def async_setup_entry(hass, config_entry, async_add_entities): def setup_climate_group(area, async_add_entities): + + # Check feature availability + if not area.has_feature(CONF_FEATURE_CLIMATE_GROUPS): + return + # Check if there are any climate entities if not area.has_entities(CLIMATE_DOMAIN): _LOGGER.debug(f"No {CLIMATE_DOMAIN} entities for area {area.name} ")