From 2e1b7a3b5f3d4e6a5085221ec1ce1d061f4fefed Mon Sep 17 00:00:00 2001 From: Johann Richard <189003+johannrichard@users.noreply.github.com> Date: Sun, 29 Jan 2023 18:35:32 +0100 Subject: [PATCH] =?UTF-8?q?fix(accessory):=20=F0=9F=90=9B=20implements=20f?= =?UTF-8?q?ix=20for=20tilt=20angle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit fix the issues in #555 with tilt angle, only convert `°` to `%` in case values is set by HomeKit Fixes #555 --- src/dingzAccessory.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dingzAccessory.ts b/src/dingzAccessory.ts index 70c246b5..e0c4a762 100644 --- a/src/dingzAccessory.ts +++ b/src/dingzAccessory.ts @@ -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, }); } @@ -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=&lamella=