diff --git a/tests/test_device.py b/tests/test_device.py index 62d83c5..fdc0889 100644 --- a/tests/test_device.py +++ b/tests/test_device.py @@ -1374,6 +1374,22 @@ def test_attributes(): "level": (100, "%", None), } + @staticmethod + def test_disabled_components(): + """Test the disabled_components property.""" + # Arrange + data = get_json("device_status.json") + status = DeviceStatus(None, DEVICE_ID, data) + # Act/Assert + assert status.disabled_components == [] + # Arrange + data["components"]["main"]["custom.disabledComponents"] = { + "disabledComponents": {"value": ["SomeDisabledComponent"]} + } + status = DeviceStatus(None, DEVICE_ID, data) + # Act/Assert + assert status.disabled_components == ["SomeDisabledComponent"] + @staticmethod def test_attributes_default(): """Test the attributes property."""