Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed Types #545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
25 changes: 22 additions & 3 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3072,7 +3072,7 @@ class Fritzdect extends utils.Adapter {
ack: true
});
} else if (key === 'tsoll') {
await this.createValueCtrl(
await this.createValueCtrlmixed(
identifier,
'tsoll',
'Setpoint Temperature',
Expand Down Expand Up @@ -3177,7 +3177,7 @@ class Fritzdect extends utils.Adapter {
ack: true
});
//create the user definde end time for manual setting the window open active state
await this.createValueCtrl(
await this.createValueCtrlmixed(
identifier,
'boostactivetime',
'boost active time for cmd',
Expand Down Expand Up @@ -3208,7 +3208,7 @@ class Fritzdect extends utils.Adapter {
ack: true
});
//create the user definde end time for manual setting the window open active state
await this.createValueCtrl(
await this.createValueCtrlmixed(
identifier,
'windowopenactivetime',
'window open active time for cmd',
Expand Down Expand Up @@ -3624,6 +3624,25 @@ class Fritzdect extends utils.Adapter {
});
return;
}
async createValueCtrlmixed(newId, datapoint, name, min, max, unit, role) {
this.log.debug('create datapoint ' + newId + ' with ' + datapoint);
await this.setObjectNotExistsAsync('DECT_' + newId + '.' + datapoint, {
type: 'state',
common: {
name: name,
type: 'mixed',
min: min,
max: max,
unit: unit,
read: true,
write: true,
role: role,
desc: name
},
native: {}
});
return;
}
async createList(newId, datapoint, name) {
this.log.debug('create list' + newId + ' with ' + datapoint);
await this.setObjectNotExistsAsync('DECT_' + newId + '.' + datapoint, {
Expand Down