Skip to content

Commit

Permalink
Merge pull request #49 from slavvka/fskg_category
Browse files Browse the repository at this point in the history
Added fskg category
  • Loading branch information
Hanh94 authored Jul 13, 2021
2 parents 1ba0904 + 299b607 commit 8b1da13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ class TuyaPlatform {
this.deviceAccessories.set(uuid, deviceAccessory);
break;
case 'fs':
case 'fskg':
deviceAccessory = new Fanv2Accessory(this, homebridgeAccessory, device);
this.accessories.set(uuid, deviceAccessory.homebridgeAccessory);
this.deviceAccessories.set(uuid, deviceAccessory);
Expand Down
2 changes: 1 addition & 1 deletion lib/fanv2_accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Fanv2Accessory extends BaseAccessory {
refreshAccessoryServiceIfNeed(statusArr, isRefresh) {
this.isRefresh = isRefresh
for (const statusMap of statusArr) {
if (statusMap.code === 'switch') {
if (statusMap.code === 'switch' || statusMap.code === 'fan_switch') {
this.switchMap = statusMap
const hbSwitch = this.tuyaParamToHomeBridge(Characteristic.Active, this.switchMap.value);
this.normalAsync(Characteristic.Active, hbSwitch, this.isRefresh)
Expand Down

0 comments on commit 8b1da13

Please sign in to comment.