Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved to querying energy usage after power report
Browse files Browse the repository at this point in the history
PKacprowiczS committed Sep 18, 2020
1 parent 327a947 commit 87d932d
Showing 1 changed file with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -82,7 +82,6 @@ def installed() {
state.temperatureSensorDni = null
sendHubCommand(encap(zwave.configurationV2.configurationGet(parameterNumber: 71)))
sendEvent(name: "checkInterval", value: 2 * 60 * 60, displayed: false, data: [protocol: "zwave", hubHardwareId: device.hub.hardwareID])
schedule(new Date(), getEnergyUsage)
// Preferences template begin
state.currentPreferencesState = [:]
parameterMap.each {
@@ -369,7 +368,11 @@ def zwaveEvent(physicalgraph.zwave.commands.meterv3.MeterReport cmd, ep = null)
events += createEvent([name: "windowShade", value: state.blindsLastCommand])
events += createEvent([name: "shadeLevel", value: state.shadeTarget, displayed: false])
} else {
events += response(encap(zwave.switchMultilevelV3.switchMultilevelGet()))
events += response([
encap(zwave.switchMultilevelV3.switchMultilevelGet()),
"delay 500",
encap(zwave.meterV3.meterGet(scale: 0x00))
])
}
}
}
@@ -449,10 +452,6 @@ private createVenetianBlindsChildDeviceIfNeeded() {
}
}

private getEnergyUsage() {
sendHubCommand(encap(zwave.meterV3.meterGet(scale: 0x00)))
}

private getParameterMap() {[
[
name: "Operating modes", key: "operatingModes", type: "enum",

0 comments on commit 87d932d

Please sign in to comment.