From de952e5207c553b51c1dbbfcb41838482fdda13a Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Fri, 31 Dec 2021 13:42:29 -0800 Subject: [PATCH] homekit: boolean properties are 0/1 --- plugins/homekit/src/types/camera.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/homekit/src/types/camera.ts b/plugins/homekit/src/types/camera.ts index 279e7e125..806388c48 100644 --- a/plugins/homekit/src/types/camera.ts +++ b/plugins/homekit/src/types/camera.ts @@ -564,7 +564,7 @@ addSupportedType({ const persistBooleanCharacteristic = (service: Service, characteristic: WithUUID<{ new(): Characteristic }>) => { const property = `characteristic-v2-${characteristic.UUID}` service.getCharacteristic(characteristic) - .on(CharacteristicEventTypes.GET, callback => callback(null, storage.getItem(property) === 'true')) + .on(CharacteristicEventTypes.GET, callback => callback(null, storage.getItem(property) === 'true' ? 1 : 0)) .on(CharacteristicEventTypes.SET, (value, callback) => { callback(); storage.setItem(property, (!!value).toString());