mirror of
https://github.com/home-assistant/core.git
synced 2026-08-24 10:13:52 -05:00
Add support for Tuya HCDD category (Chasing Tape Light) (#177044)
Co-authored-by: Anthony Zavala <AnthonyZavala@users.noreply.github.com> Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
co-authored by
Anthony Zavala
Copilot App
parent
a0795b3b96
commit
8e36e85037
@@ -491,6 +491,8 @@ class DeviceCategory(StrEnum):
|
||||
"""
|
||||
FSKG = "fskg"
|
||||
"""Fan wall switch (undocumented)"""
|
||||
HCDD = "hcdd"
|
||||
"""Chasing tape light (undocumented)"""
|
||||
HJJCY = "hjjcy"
|
||||
"""Air Quality Monitor
|
||||
|
||||
|
||||
@@ -164,6 +164,16 @@ LIGHTS: dict[DeviceCategory, tuple[TuyaLightEntityDescription, ...]] = {
|
||||
color_data=DPCode.COLOUR_DATA,
|
||||
),
|
||||
),
|
||||
DeviceCategory.HCDD: (
|
||||
TuyaLightEntityDescription(
|
||||
key=DPCode.SWITCH_LED,
|
||||
name=None,
|
||||
color_mode=DPCode.WORK_MODE,
|
||||
brightness=DPCode.BRIGHT_VALUE,
|
||||
color_temp=DPCode.TEMP_VALUE,
|
||||
color_data=DPCode.COLOUR_DATA,
|
||||
),
|
||||
),
|
||||
DeviceCategory.HXD: (
|
||||
TuyaLightEntityDescription(
|
||||
key=DPCode.SWITCH_LED,
|
||||
|
||||
@@ -2450,7 +2450,7 @@
|
||||
'labels': set({
|
||||
}),
|
||||
'manufacturer': 'Tuya',
|
||||
'model': 'Chasing Tape Light (unsupported)',
|
||||
'model': 'Chasing Tape Light',
|
||||
'model_id': 'expmpw4xxd0kkifb',
|
||||
'name': 'Chasing Tape Light',
|
||||
'name_by_user': None,
|
||||
|
||||
@@ -808,6 +808,84 @@
|
||||
'state': 'off',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[light.chasing_tape_light-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
None,
|
||||
]),
|
||||
'area_id': None,
|
||||
'capabilities': dict({
|
||||
<LightEntityCapabilityAttribute.MAX_COLOR_TEMP_KELVIN: 'max_color_temp_kelvin'>: 6500,
|
||||
<LightEntityCapabilityAttribute.MIN_COLOR_TEMP_KELVIN: 'min_color_temp_kelvin'>: 2000,
|
||||
<LightEntityCapabilityAttribute.SUPPORTED_COLOR_MODES: 'supported_color_modes'>: list([
|
||||
<ColorMode.COLOR_TEMP: 'color_temp'>,
|
||||
]),
|
||||
}),
|
||||
'config_entry_id': <ANY>,
|
||||
'config_subentry_id': <ANY>,
|
||||
'device_class': None,
|
||||
'device_id': <ANY>,
|
||||
'disabled_by': None,
|
||||
'domain': 'light',
|
||||
'entity_category': None,
|
||||
'entity_id': 'light.chasing_tape_light',
|
||||
'has_entity_name': True,
|
||||
'hidden_by': None,
|
||||
'icon': None,
|
||||
'id': <ANY>,
|
||||
'labels': set({
|
||||
}),
|
||||
'name': None,
|
||||
'object_id_base': None,
|
||||
'options': dict({
|
||||
}),
|
||||
'original_device_class': None,
|
||||
'original_icon': None,
|
||||
'original_name': None,
|
||||
'platform': 'tuya',
|
||||
'previous_unique_id': None,
|
||||
'suggested_object_id': None,
|
||||
'supported_features': 0,
|
||||
'translation_key': None,
|
||||
'unique_id': 'tuya.bfikk0dxx4wpmpxeddchswitch_led',
|
||||
'unit_of_measurement': None,
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[light.chasing_tape_light-state]
|
||||
StateSnapshot({
|
||||
'attributes': ReadOnlyDict({
|
||||
<LightEntityStateAttribute.BRIGHTNESS: 'brightness'>: 255,
|
||||
<LightEntityStateAttribute.COLOR_MODE: 'color_mode'>: <ColorMode.COLOR_TEMP: 'color_temp'>,
|
||||
<LightEntityStateAttribute.COLOR_TEMP_KELVIN: 'color_temp_kelvin'>: 2000,
|
||||
<EntityStateAttribute.FRIENDLY_NAME: 'friendly_name'>: 'Chasing Tape Light',
|
||||
<LightEntityStateAttribute.HS_COLOR: 'hs_color'>: tuple(
|
||||
30.601,
|
||||
94.547,
|
||||
),
|
||||
<LightEntityCapabilityAttribute.MAX_COLOR_TEMP_KELVIN: 'max_color_temp_kelvin'>: 6500,
|
||||
<LightEntityCapabilityAttribute.MIN_COLOR_TEMP_KELVIN: 'min_color_temp_kelvin'>: 2000,
|
||||
<LightEntityStateAttribute.RGB_COLOR: 'rgb_color'>: tuple(
|
||||
255,
|
||||
137,
|
||||
14,
|
||||
),
|
||||
<LightEntityCapabilityAttribute.SUPPORTED_COLOR_MODES: 'supported_color_modes'>: list([
|
||||
<ColorMode.COLOR_TEMP: 'color_temp'>,
|
||||
]),
|
||||
<EntityStateAttribute.SUPPORTED_FEATURES: 'supported_features'>: <LightEntityFeature: 0>,
|
||||
<LightEntityStateAttribute.XY_COLOR: 'xy_color'>: tuple(
|
||||
0.598,
|
||||
0.383,
|
||||
),
|
||||
}),
|
||||
'context': <ANY>,
|
||||
'entity_id': 'light.chasing_tape_light',
|
||||
'last_changed': <ANY>,
|
||||
'last_reported': <ANY>,
|
||||
'last_updated': <ANY>,
|
||||
'state': 'on',
|
||||
})
|
||||
# ---
|
||||
# name: test_platform_setup_and_discovery[light.cleverio_pf100_light-entry]
|
||||
EntityRegistryEntrySnapshot({
|
||||
'aliases': list([
|
||||
|
||||
Reference in New Issue
Block a user