Skip to content

Commit

Permalink
fix(dingz): better fix for #124
Browse files Browse the repository at this point in the history
- update for b8d03a8
- fixes #124
  • Loading branch information
johannrichard committed Nov 22, 2020
1 parent 7364c7f commit c666340
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dingzAccessory.ts
Expand Up @@ -862,9 +862,9 @@ export class DingzDaAccessory extends EventEmitter {

// Set min/max Values
// FIXME: Implement different lamella/blind modes #24
const maxTiltValue = semver.gt(this.dingzDeviceInfo.fw_version, '1.2.0')
? 100
: 90;
const maxTiltValue = semver.lt(this.dingzDeviceInfo.fw_version, '1.2.0')
? 90
: 100;
service
.getCharacteristic(this.platform.Characteristic.TargetHorizontalTiltAngle)
.setProps({ minValue: 0, maxValue: maxTiltValue }) // dingz Maximum values
Expand Down Expand Up @@ -918,9 +918,9 @@ export class DingzDaAccessory extends EventEmitter {
* - We're moving by pressing the "up/down" buttons in the UI or Hardware [x]
*/

const maxTiltValue = semver.gt(this.dingzDeviceInfo.fw_version, '1.2.0')
? 100
: 90;
const maxTiltValue = semver.lt(this.dingzDeviceInfo.fw_version, '1.2.0')
? 90
: 100;

service
.getCharacteristic(this.platform.Characteristic.TargetPosition)
Expand Down

0 comments on commit c666340

Please sign in to comment.