Skip to content

Commit

Permalink
Weather Forecast and Stopwatch
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and [email protected] committed Feb 25, 2020
1 parent a297fa2 commit 72424c4
Showing 1 changed file with 71 additions and 1 deletion.
72 changes: 71 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -516,8 +516,78 @@ class LaMetric extends utils.Adapter {
native: {}
});

} else if (pack.package == 'com.lametric.stopwatch') {

this.setObjectNotExists(path + uuid + '.stopwatch', {
type: 'channel',
common: {
name: pack.package,
role: ''
},
native: {}
});

this.setObjectNotExists(path + uuid + '.stopwatch.start', {
type: 'state',
common: {
name: 'Start Stopwatch',
type: 'boolean',
role: 'button',
read: false,
write: true
},
native: {}
});

this.setObjectNotExists(path + uuid + '.stopwatch.pause', {
type: 'state',
common: {
name: 'Pause Stopwatch',
type: 'boolean',
role: 'button',
read: false,
write: true
},
native: {}
});

this.setObjectNotExists(path + uuid + '.stopwatch.reset', {
type: 'state',
common: {
name: 'Reset Stopwatch',
type: 'boolean',
role: 'button',
read: false,
write: true
},
native: {}
});

} else if (pack.package == 'com.lametric.weather') {

this.setObjectNotExists(path + uuid + '.weather', {
type: 'channel',
common: {
name: pack.package,
role: ''
},
native: {}
});

this.setObjectNotExists(path + uuid + '.weather.forecast', {
type: 'state',
common: {
name: 'Weather Forecast',
type: 'boolean',
role: 'button',
read: false,
write: true
},
native: {}
});

}

// END special Widgets
}
}
Expand Down

0 comments on commit 72424c4

Please sign in to comment.