Skip to content

Commit

Permalink
Merge pull request #77 from prasad-edlabadka/bugfix/fan-api
Browse files Browse the repository at this point in the history
Bugfix/fan api
  • Loading branch information
prasad-edlabadka authored Sep 10, 2022
2 parents 6c66c1f + daf5dc9 commit 36ceba0
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/lib/accessories/FanAccessory.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/lib/accessories/GenericAccessory.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"private": false,
"displayName": "Homebridge Tuya IR Platform",
"name": "homebridge-tuya-ir",
"version": "1.0.7",
"version": "1.0.8",
"description": "Allows homebridge to control Tuya IR Blaster based devices",
"license": "Apache-2.0",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/accessories/FanAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class FanAccessory extends BaseAccessory {
private readonly accessory: PlatformAccessory,
) {
super(platform, accessory);
this.sendCommandAPIURL = accessory.context.device.diy ? `${this.configuration.apiHost}/v2.0/infrareds/${this.parentId}/remotes/${accessory.context.device.id}/learning-codes` : `${this.configuration.apiHost}/v2.0/infrareds/${this.parentId}/remotes/${accessory.context.device.id}/raw/command`;
this.sendCommandAPIURL = accessory.context.device.diy ? `${this.configuration.apiHost}/v2.0/infrareds/${this.parentId}/remotes/${accessory.context.device.id}/learning-codes` : `${this.configuration.apiHost}/v1.0/infrareds/${this.parentId}/remotes/${accessory.context.device.id}/raw/command`;
this.sendCommandKey = accessory.context.device.diy ? 'code' : 'raw_key';

this.accessory?.getService(this.platform.Service.AccessoryInformation)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/accessories/GenericAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class GenericAccessory extends BaseAccessory {
private readonly accessory: PlatformAccessory,
) {
super(platform, accessory);
this.sendCommandAPIURL = `${this.configuration.apiHost}/v2.0/infrareds/${this.parentId}/remotes/${accessory.context.device.id}/raw/command`;
this.sendCommandAPIURL = `${this.configuration.apiHost}/v1.0/infrareds/${this.parentId}/remotes/${accessory.context.device.id}/raw/command`;

// set accessory information
this.accessory.getService(this.platform.Service.AccessoryInformation)
Expand Down

0 comments on commit 36ceba0

Please sign in to comment.