Skip to content

Commit f535dcd

Browse files
authored
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
1 parent 104953b commit f535dcd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

custom_components/magic_areas/climate.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
109109

110110

111111
def setup_climate_group(area, async_add_entities):
112+
113+
# Check feature availability
114+
if not area.has_feature(CONF_FEATURE_CLIMATE_GROUPS):
115+
return
116+
112117
# Check if there are any climate entities
113118
if not area.has_entities(CLIMATE_DOMAIN):
114119
_LOGGER.debug(f"No {CLIMATE_DOMAIN} entities for area {area.name} ")

0 commit comments

Comments
 (0)