Skip to content

Commit

Permalink
Adding back feature enable check to climate groups (#321)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jseidl authored Feb 29, 2024
1 parent 104953b commit f535dcd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions custom_components/magic_areas/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -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} ")
Expand Down

0 comments on commit f535dcd

Please sign in to comment.