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

[ICP-13411] Qubino Flush Shutter - energy usage is not reported #42222

Merged
merged 2 commits into from
Oct 16, 2020
Merged
Changes from 1 commit
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
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ 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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason you're using schedule here and not runIn or just sending the hub command from within here?

Copy link
Contributor Author

@PKacprowiczS PKacprowiczS Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want it to run every day, as I've described in the ticket and according to the documentation using schedule with new Date() is one way to do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

huh, interesting

// Preferences template begin
state.currentPreferencesState = [:]
parameterMap.each {
Expand Down Expand Up @@ -448,6 +449,10 @@ private createVenetianBlindsChildDeviceIfNeeded() {
}
}

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

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