Skip to content

Commit

Permalink
implemented hue tap dial (see #368)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Aug 29, 2023
1 parent 025c7f0 commit 932a322
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ In den Adapter-Settings muss die IP der Hue Bridge sowie ein Username konfigurie

### __WORK IN PROGRESS__
* (foxriver76) fixed problem on auto-deletion of groups
* (foxriver76) implemented Hue Tap Dial (closes #368)

### 3.9.6 (2023-08-16)
* (foxriver76) do not set invalid states on unknown group updates
Expand Down
27 changes: 26 additions & 1 deletion 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.

27 changes: 26 additions & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,15 @@ const pollGroups: PollLight[] = [];

let noDevices: number;

const SUPPORTED_SENSORS = ['ZLLSwitch', 'ZGPSwitch', 'Daylight', 'ZLLTemperature', 'ZLLPresence', 'ZLLLightLevel'];
const SUPPORTED_SENSORS = [
'ZLLSwitch',
'ZGPSwitch',
'Daylight',
'ZLLTemperature',
'ZLLPresence',
'ZLLLightLevel',
'ZLLRelativeRotary'
];
const SOFTWARE_SENSORS = ['CLIPGenericStatus', 'CLIPGenericFlag'];

class Hue extends utils.Adapter {
Expand Down Expand Up @@ -1478,6 +1486,23 @@ class Hue extends utils.Adapter {
lobj.common.write = false;
value = this.convertTemperature(value);
break;
case 'rotaryevent':
lobj.common.type = 'number';
lobj.common.role = 'state';
lobj.common.write = false;
break;
case 'expectedrotation':
lobj.common.type = 'number';
lobj.common.role = 'state';
lobj.common.write = false;
lobj.common.unit = '°';
break;
case 'expectedeventduration':
lobj.common.type = 'number';
lobj.common.role = 'state';
lobj.common.write = false;
lobj.common.unit = 'ms';
break;
default:
lobj.common.type = 'mixed';
this.log.info(`skip switch: ${objId}`);
Expand Down

0 comments on commit 932a322

Please sign in to comment.