Skip to content

Commit

Permalink
Added daily energy usage report
Browse files Browse the repository at this point in the history
  • Loading branch information
PKacprowiczS committed Sep 10, 2020
1 parent 92cbc53 commit 0e39c72
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ def installed() {
if (!childDevices && state.numberOfSwitches > 1) {
addChildSwitches(state.numberOfSwitches)
}

schedule(new Date(), getEnergyUsage)
sendEvent(name: "checkInterval", value: 2 * 15 * 60 + 2 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
// Preferences template begin
state.currentPreferencesState = [:]
Expand Down Expand Up @@ -114,6 +116,12 @@ def updated() {
// Preferences template end
}

private getEnergyUsage() {
for (def endpoint : 1..state.numberOfSwitches) {
sendHubCommand(encap(zwave.meterV3.meterGet(scale: 0x00)), endpoint)
}
}

def excludeParameterFromSync(preference){
def exclude = false
if (preference.key == "outputQ2SwitchSelection") {
Expand Down

0 comments on commit 0e39c72

Please sign in to comment.