You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The BaseModule Z-Way HA module is a very handy base for HA modules.
One of its great features is that it does not process "events" of devices/sensors which last level equals the newly measured level:
File userModules/BaseModule/index.js, around line 80:
BaseModule.prototype.handleLevelModification = function(vDev) {
...
// Not changed
if (lastLevel == newLevel) return;
...
}
This works fine for most devices and sensors, but it does not work for scene controller devices. On those controllers, you want every push to be processed, even if the same button in pressed in sequence.
(Use case: One of the buttons on a scene controller is used to simply toggle a light on and off. The first push on the button turns light on, the next press turns it off. With the current BaseModule implementation, only the very first press is registered).
The BaseModule Z-Way HA module is a very handy base for HA modules.
One of its great features is that it does not process "events" of devices/sensors which last level equals the newly measured level:
File
userModules/BaseModule/index.js
, around line 80:This works fine for most devices and sensors, but it does not work for scene controller devices. On those controllers, you want every push to be processed, even if the same button in pressed in sequence.
(Use case: One of the buttons on a scene controller is used to simply toggle a light on and off. The first push on the button turns light on, the next press turns it off. With the current BaseModule implementation, only the very first press is registered).
These are the ones I have:
https://www.thesmartesthouse.com/products/hank-z-wave-plus-four-button-scene-controller-hkzw-scn04
http://manuals-backend.z-wave.info/make.php?lang=en&sku=REMEZRC90
For both these devices, the following is true:
and the commandClass is 91 for both (Scene Controller Configuration Command Class).
I would like to propose to make a very small change to
userModules/BaseModule/index.js
Instead of
do
Now we can properly handle button presses on scene controllers.
Thanks in advance!
The text was updated successfully, but these errors were encountered: