Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down