diff --git a/homeassistant/components/zha/api.py b/homeassistant/components/zha/api.py index 2b41deaab6b..053162010e8 100644 --- a/homeassistant/components/zha/api.py +++ b/homeassistant/components/zha/api.py @@ -61,7 +61,7 @@ from .core.const import ( ) from .core.group import GroupMember from .core.helpers import ( - async_input_cluster_exists, + async_cluster_exists, async_is_bindable_target, convert_install_code, get_matched_clusters, @@ -897,7 +897,7 @@ async def websocket_get_configuration(hass, connection, msg): data = {"schemas": {}, "data": {}} for section, schema in ZHA_CONFIG_SCHEMAS.items(): - if section == ZHA_ALARM_OPTIONS and not async_input_cluster_exists( + if section == ZHA_ALARM_OPTIONS and not async_cluster_exists( hass, IasAce.cluster_id ): continue diff --git a/homeassistant/components/zha/core/helpers.py b/homeassistant/components/zha/core/helpers.py index 84088148a8e..34359c19420 100644 --- a/homeassistant/components/zha/core/helpers.py +++ b/homeassistant/components/zha/core/helpers.py @@ -139,14 +139,17 @@ def async_get_zha_config_value(config_entry, section, config_key, default): ) -def async_input_cluster_exists(hass, cluster_id): +def async_cluster_exists(hass, cluster_id): """Determine if a device containing the specified in cluster is paired.""" zha_gateway = hass.data[DATA_ZHA][DATA_ZHA_GATEWAY] zha_devices = zha_gateway.devices.values() for zha_device in zha_devices: clusters_by_endpoint = zha_device.async_get_clusters() for clusters in clusters_by_endpoint.values(): - if cluster_id in clusters[CLUSTER_TYPE_IN]: + if ( + cluster_id in clusters[CLUSTER_TYPE_IN] + or cluster_id in clusters[CLUSTER_TYPE_OUT] + ): return True return False diff --git a/homeassistant/components/zha/core/registries.py b/homeassistant/components/zha/core/registries.py index 42f09d5323f..5fe7f806355 100644 --- a/homeassistant/components/zha/core/registries.py +++ b/homeassistant/components/zha/core/registries.py @@ -83,7 +83,8 @@ SINGLE_INPUT_CLUSTER_DEVICE_CLASS = { } SINGLE_OUTPUT_CLUSTER_DEVICE_CLASS = { - zcl.clusters.general.OnOff.cluster_id: BINARY_SENSOR + zcl.clusters.general.OnOff.cluster_id: BINARY_SENSOR, + zcl.clusters.security.IasAce.cluster_id: ALARM, } BINDABLE_CLUSTERS = SetRegistry()