Skip to content

Commit

Permalink
level and bri states of groups are now updated via push API
Browse files Browse the repository at this point in the history
- closes #523
  • Loading branch information
foxriver76 committed Jul 14, 2024
1 parent eece946 commit 4f28c67
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 16 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- uses: actions/checkout@v4
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down Expand Up @@ -82,7 +82,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]

steps:
- name: Checkout code
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,10 @@ In den Adapter-Settings muss die IP der Hue Bridge sowie ein Username konfigurie
Placeholder for the next version (at the beginning of the line):
### __WORK IN PROGRESS__
-->

### __WORK IN PROGRESS__
* (foxriver76) `level` and `bri` states of groups are now updated via push API

### 3.11.0 (2024-03-26)
* (seb2010) added possibility to use global light-scenes in commands (in addition to object-lightscene)
* (foxriver76) dropped support of node 16 (End-Of-Life)
Expand Down
15 changes: 7 additions & 8 deletions build/lib/hueHelper.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/lib/hueHelper.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions build/lib/tools.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/lib/tools.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions build/main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion build/main.js.map

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1305,6 +1305,15 @@ class Hue extends utils.Adapter {
return;
}

if (update.dimming) {
await this.setStateAsync(`${channelName}.level`, Math.round(update.dimming.brightness), true);
await this.setStateAsync(
`${channelName}.bri`,
hueHelper.levelToBrightness(update.dimming.brightness),
true
);
}

if (update.on) {
await this.setStateAsync(`${channelName}.on`, update.on.on, true);
}
Expand Down

0 comments on commit 4f28c67

Please sign in to comment.