From 43ec5d42899ad71bc99ca155d2382236a62bfa20 Mon Sep 17 00:00:00 2001 From: gaosen <0x5e@sina.cn> Date: Fri, 28 Oct 2022 00:14:52 +0800 Subject: [PATCH] Add Spotlight support (sxd). --- CHANGELOG.md | 1 + SUPPORTED_DEVICES.md | 2 +- src/accessory/AccessoryFactory.ts | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f4a7b03b..868675bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ - [Window] Add Curtain Switch support (`clkg`). - [OccupancySensor] Add Human Presence Sensor support (`hps`). - [Thermostat] Add Thermostat support (`wk`). +- [Light] Add Spotlight support (`sxd`). ### Known issue - Sometimes mqtt not respond quickly, the older message received later than newer one. This will influence the accessory status update. diff --git a/SUPPORTED_DEVICES.md b/SUPPORTED_DEVICES.md index 176d4d40..fb0c2b5d 100644 --- a/SUPPORTED_DEVICES.md +++ b/SUPPORTED_DEVICES.md @@ -19,7 +19,7 @@ Most category code is pinyin abbreviation of Chinese name. | Solar Light | 太阳能灯 | tyndj | | | | Dimmer | 调光器 | tgq | Lightbulb | ✅ | | Remote Control | 遥控器 | ykq | | | -| Spotlight | 射灯 | sxd | | | +| Spotlight | 射灯 | sxd | Lightbulb | ✅ | ## Electrical Products diff --git a/src/accessory/AccessoryFactory.ts b/src/accessory/AccessoryFactory.ts index 98b23193..673f1b90 100644 --- a/src/accessory/AccessoryFactory.ts +++ b/src/accessory/AccessoryFactory.ts @@ -36,11 +36,12 @@ export default class AccessoryFactory { // TODO AirPurifierAccessory break; case 'dj': - case 'dd': - case 'fwd': - case 'tgq': case 'xdd': + case 'fwd': case 'dc': + case 'dd': + case 'tgq': + case 'sxd': case 'tgkg': handler = new LightAccessory(platform, accessory); break;