diff --git a/homeassistant/components/matter/cover.py b/homeassistant/components/matter/cover.py index 2e2d4390b30..7bef7ea1853 100644 --- a/homeassistant/components/matter/cover.py +++ b/homeassistant/components/matter/cover.py @@ -31,8 +31,14 @@ OPERATIONAL_STATUS_MASK = 0b11 # map Matter window cover types to HA device class TYPE_MAP = { + clusters.WindowCovering.Enums.Type.kRollerShade: CoverDeviceClass.SHADE, + clusters.WindowCovering.Enums.Type.kRollerShade2Motor: CoverDeviceClass.SHADE, + clusters.WindowCovering.Enums.Type.kRollerShadeExterior: CoverDeviceClass.SHADE, + clusters.WindowCovering.Enums.Type.kRollerShadeExterior2Motor: CoverDeviceClass.SHADE, clusters.WindowCovering.Enums.Type.kAwning: CoverDeviceClass.AWNING, clusters.WindowCovering.Enums.Type.kDrapery: CoverDeviceClass.CURTAIN, + clusters.WindowCovering.Enums.Type.kTiltBlindTiltOnly: CoverDeviceClass.BLIND, + clusters.WindowCovering.Enums.Type.kTiltBlindLiftAndTilt: CoverDeviceClass.BLIND, } diff --git a/tests/components/matter/snapshots/test_cover.ambr b/tests/components/matter/snapshots/test_cover.ambr index c8e2c03739a..c0b38a58456 100644 --- a/tests/components/matter/snapshots/test_cover.ambr +++ b/tests/components/matter/snapshots/test_cover.ambr @@ -124,7 +124,7 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, 'original_name': None, 'platform': 'matter', @@ -140,7 +140,7 @@ StateSnapshot({ 'attributes': ReadOnlyDict({ 'current_position': 51, - 'device_class': 'awning', + 'device_class': 'shade', 'friendly_name': 'Longan link WNCV DA01', 'supported_features': , }), @@ -175,7 +175,7 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, 'original_name': None, 'platform': 'matter', @@ -191,7 +191,7 @@ StateSnapshot({ 'attributes': ReadOnlyDict({ 'current_tilt_position': 100, - 'device_class': 'awning', + 'device_class': 'blind', 'friendly_name': 'Mock PA Tilt Window Covering', 'supported_features': , }), @@ -226,7 +226,7 @@ 'name': None, 'options': dict({ }), - 'original_device_class': , + 'original_device_class': , 'original_icon': None, 'original_name': None, 'platform': 'matter', @@ -241,7 +241,7 @@ # name: test_covers[window_covering_tilt][cover.mock_tilt_window_covering-state] StateSnapshot({ 'attributes': ReadOnlyDict({ - 'device_class': 'awning', + 'device_class': 'blind', 'friendly_name': 'Mock Tilt Window Covering', 'supported_features': , }),