From 9f3df52fcc5e3c69fc1bd8668f608aa926198549 Mon Sep 17 00:00:00 2001 From: Heindrich Paul Date: Mon, 10 Nov 2025 13:57:54 +0100 Subject: [PATCH] Added light support to cat litter boxes (#156051) --- homeassistant/components/tuya/light.py | 7 +++ .../components/tuya/snapshots/test_light.ambr | 57 +++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/homeassistant/components/tuya/light.py b/homeassistant/components/tuya/light.py index 83eea2f41f51..0f508e01302c 100644 --- a/homeassistant/components/tuya/light.py +++ b/homeassistant/components/tuya/light.py @@ -240,6 +240,13 @@ LIGHTS: dict[DeviceCategory, tuple[TuyaLightEntityDescription, ...]] = { color_data=DPCode.COLOUR_DATA, ), ), + DeviceCategory.MSP: ( + TuyaLightEntityDescription( + key=DPCode.LIGHT, + translation_key="light", + entity_category=EntityCategory.CONFIG, + ), + ), DeviceCategory.QJDCZ: ( TuyaLightEntityDescription( key=DPCode.SWITCH_LED, diff --git a/tests/components/tuya/snapshots/test_light.ambr b/tests/components/tuya/snapshots/test_light.ambr index b50bb1804be4..f972c100766a 100644 --- a/tests/components/tuya/snapshots/test_light.ambr +++ b/tests/components/tuya/snapshots/test_light.ambr @@ -1827,6 +1827,63 @@ 'state': 'on', }) # --- +# name: test_platform_setup_and_discovery[light.kattenbak_light-entry] + EntityRegistryEntrySnapshot({ + 'aliases': set({ + }), + 'area_id': None, + 'capabilities': dict({ + 'supported_color_modes': list([ + , + ]), + }), + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'light', + 'entity_category': , + 'entity_id': 'light.kattenbak_light', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': None, + 'original_name': 'Light', + 'platform': 'tuya', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': 'light', + 'unique_id': 'tuya.yohkwjjdjlzludd3psmlight', + 'unit_of_measurement': None, + }) +# --- +# name: test_platform_setup_and_discovery[light.kattenbak_light-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'color_mode': None, + 'friendly_name': 'Kattenbak Light', + 'supported_color_modes': list([ + , + ]), + 'supported_features': , + }), + 'context': , + 'entity_id': 'light.kattenbak_light', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'off', + }) +# --- # name: test_platform_setup_and_discovery[light.landing-entry] EntityRegistryEntrySnapshot({ 'aliases': set({