diff --git a/README.md b/README.md index 1a7429d..dd27f5a 100644 --- a/README.md +++ b/README.md @@ -205,31 +205,35 @@ await client.airPurifiers.setStatusLight({ #### [Blinds](./src/api/blinds.ts) -Not tested, feedback required. - ```typescript const blinds = await client.blinds.list() const blind = await client.blinds.get({ id: 'YOUR_DEVICE_ID', }) +// blind.attributes.blindsCurrentLevel — where the blind currently is (0–100) +// blind.attributes.blindsTargetLevel — where the blind is heading (0–100) +// blind.attributes.blindsState — 'stopped' | 'up' | 'down' +// blind.attributes.batteryPercentage — battery level of the blind motor -await client.blinds.setCurrentLevel({ - id: 'YOUR_DEVICE_ID', - blindsCurrentLevel: 0, -}) - +// Move the blind to a specific level and stop there. +// 0 = fully up (open), 50 = halfway down, 100 = fully down (closed). await client.blinds.setTargetLevel({ id: 'YOUR_DEVICE_ID', - blindsTargetLevel: 60, + blindsTargetLevel: 50, }) +// Start moving the blind continuously up or down, or stop it. +// The blind stops automatically and sets its state to 'stopped' +// when it reaches level 0 (fully up) or 100 (fully down). await client.blinds.setState({ id: 'YOUR_DEVICE_ID', - blindsState: 'stopped', // 'stopped' | 'up' | 'down' + blindsState: 'up', // 'stopped' | 'up' | 'down' }) ``` +> **Note:** `setCurrentLevel` is not supported by the hub and returns an API error. + #### [Controllers](./src/api/controllers.ts) Some controllers, such as the BILRESA remote appear as multiple devices.