Skip to content

Commit

Permalink
Add Spotlight support (sxd). (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
0x5e authored Oct 28, 2022
1 parent 24a2975 commit 2935c30
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion SUPPORTED_DEVICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/accessory/AccessoryFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2935c30

Please sign in to comment.