Skip to content

Commit

Permalink
Merge pull request #577 from johannrichard/next
Browse files Browse the repository at this point in the history
prepare alpha release
  • Loading branch information
johannrichard authored Jan 29, 2023
2 parents 080f536 + d974202 commit 7e94ac4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ web_modules/
# Github templates and actions, own stuff
.github
api
.husky
.prettierrc
.prettierignore
commitlint.config.js
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"main": "dist/index.js",
"scripts": {
"lint": "eslint src/**.ts",
"postinstall": "husky install",
"postinstall": "yarn husky install",
"prepack": "yarn pinst --disable",
"postpack": "yarn pinst --enable",
"watch": "yarn dlx nodemon",
Expand Down
4 changes: 2 additions & 2 deletions src/dingzAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ export class DingzAccessory extends DingzDaBaseAccessory {
await this.setWindowCovering({
id: id,
blind: position as number,
lamella: (windowCovering.lamella / 90) * 100, // FIXES #419, we must convert ° to %
lamella: windowCovering.lamella, // FIXES #419, we must convert ° to %
callback: callback,
});
}
Expand Down Expand Up @@ -1518,7 +1518,7 @@ export class DingzAccessory extends DingzDaBaseAccessory {
lamella = Math.round(lamella);

this.log.debug(
`Setting WindowCovering ${id} to position ${blind} and angle ${lamella}°`,
`Setting WindowCovering ${id} to position ${blind} and ${lamella}% tilt position`,
);
// The API says the parameters can be omitted. This is not true
// {{ip}}/api/v1/shade/0?blind=<value>&lamella=<value>
Expand Down
9 changes: 9 additions & 0 deletions src/myStromSwitchAccessory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,15 @@ export class MyStromSwitchAccessory extends DingzDaBaseAccessory {
this.temperatureService
.getCharacteristic(this.platform.Characteristic.CurrentTemperature)
.on(CharacteristicEventTypes.GET, this.getTemperature.bind(this));
} else {
// Make sure spurious temperature services (e.g. from Zero and CH v1) don't remain in the system
const temperatureService: Service | undefined = this.accessory.getService(
this.platform.Service.TemperatureSensor,
);
if (temperatureService !== undefined) {
this.platform.log.warn('Removing spurious temperature service');
this.accessory.removeService(temperatureService);
}
}
}

Expand Down

0 comments on commit 7e94ac4

Please # to comment.