Skip to content

Commit

Permalink
cleanup after merge
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Mar 26, 2024
1 parent 3ea55c1 commit 7409902
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [18.x, 20.x]
os: [ubuntu-latest, windows-latest, macos-latest]

steps:
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,11 @@ 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__
* (seb2010) added possibility to use global light-scenes in commands (in addition to object-lightscene)
-->

### __WORK IN PROGRESS__
* (seb2010) added possibility to use global light-scenes in commands (in addition to object-lightscene)

### 3.10.2 (2023-12-25)
* (foxriver76) bring back short delay between setting and polling a group
* (foxriver76) use adapter internal timer methods
Expand Down
8 changes: 6 additions & 2 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.

13 changes: 8 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -488,11 +488,14 @@ class Hue extends utils.Adapter {
const commands = JSON.parse(state.val as string);

if (typeof commands.scene === 'string') {
// we need to get the id of the scene
//try the object scene-tree first
const sceneObj = await this.getObjectAsync(`${channelId}.scene_${commands.scene.toLowerCase()}`);
//if no id could be obtained, try the global scene-tree
if(sceneObj === null){sceneObj = await this.getObjectAsync(`${this.namespace}.lightScenes.scene_${commands.scene.toLowerCase()}`);}
// we need to get the id of the scene - try the object scene-tree first
let sceneObj = await this.getObjectAsync(`${channelId}.scene_${commands.scene.toLowerCase()}`);
// if no id could be obtained, try the global scene-tree
if (sceneObj === null) {
sceneObj = await this.getObjectAsync(
`${this.namespace}.lightScenes.scene_${commands.scene.toLowerCase()}`
);
}

if (sceneObj?.native) {
sceneId = sceneObj.native.id;
Expand Down

0 comments on commit 7409902

Please sign in to comment.