Closed rapamatic closed 5 years ago
Will look at this when I get home again, which won’t be until Christmas.
joe
On Dec 8, 2018, at 6:16 AM, Ray Kramer notifications@github.com wrote:
Per my discussions here https://forums.indigodomo.com/viewtopic.php?f=78&t=17432&p=170975 when a light is turned on the plugin should not be turning the device on and then separately setting the brightness of the device. Instead, it should just be setting the brightness.
The fix is just to remove the first update statement that sets the ONOFF state to true, leaving just the statement setting the brightness level.
At least in the plugin version running on my mac, this code starts on line 863, and the line to remove is line 867:
zone = self.dimmers[id] if int(level) == 0: zone.updateStateOnServer(ONOFF, False) else: zone.updateStateOnServer(ONOFF, True) zone.updateStateOnServer("brightnessLevel", int(level)) self.logger.debug(u"Received: Dimmer " + zone.name + " level set to " + str(level))
should instead be:
zone = self.dimmers[id] if int(level) == 0: zone.updateStateOnServer(ONOFF, False) else: zone.updateStateOnServer("brightnessLevel", int(level)) self.logger.debug(u"Received: Dimmer " + zone.name + " level set to " + str(level)) I don't know if this is the same thing for other device types (fans perhaps, shades unlikely)
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Enjoy the diving! I made the change in my local copy of the plugin and it’s working fine.
You could fork the repo and do a pull request. :)
Sent from my iPhone
On Dec 8, 2018, at 12:28 PM, Ray Kramer notifications@github.com wrote:
Enjoy the diving! I made the change in my local copy of the plugin and it’s working fine.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.
I’ll give it a shot. I usually manage to screw up github somehow.
What incorrect lighting behavior does this fix? Just curious - I’ve never noticed a problem.
On Sat, Dec 8, 2018 at 8:13 AM Ray Kramer notifications@github.com wrote:
I’ll give it a shot. I usually manage to screw up github somehow.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/FlyingDiver/Indigo-radiora2/issues/27#issuecomment-445466258, or mute the thread https://github.com/notifications/unsubscribe-auth/AhpQiHtKKwG2pZdbLt8MPC4slQN9rj00ks5u29cEgaJpZM4ZJOuQ .
It’s a very bizarre edge case. The old code would first turn the light device on, and which point it would show its default brightness (100%). Almost immediately thereafter the code would update the device to the correct brightness. Normally this wouldn’t be an issue, since the device in indigo would only show the incorrect 100% brightness for a split second. However, I had triggers based on lights going to 100%, and they were being falsely triggered by that split second 100% brightness. This change prevents that from happening.
You could fork the repo and do a pull request. :)
Alright, just submitted the pull request
Releasing in 7.2.3
Per my discussions here https://forums.indigodomo.com/viewtopic.php?f=78&t=17432&p=170975 when a light is turned on the plugin should not be turning the device on and then separately setting the brightness of the device. Instead, it should just be setting the brightness.
The fix is just to remove the first update statement that sets the ONOFF state to true, leaving just the statement setting the brightness level.
At least in the plugin version running on my mac, this code starts on line 863, and the line to remove is line 867:
should instead be:
I don't know if this is the same thing for other device types (fans perhaps, shades unlikely)