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

Presence of transition parameter influences brightness in ON command #2220

Closed
Otah opened this issue Oct 28, 2019 · 7 comments
Closed

Presence of transition parameter influences brightness in ON command #2220

Otah opened this issue Oct 28, 2019 · 7 comments

Comments

@Otah
Copy link

Otah commented Oct 28, 2019

Bug Report

What happened

When a light is on and has e.g. brightness: 50, sending a command {"state": "ON", "transition": 1} sets the brightness to maximum (255). Whereas if you send just {"state": "ON"}, nothing happens (= the light stays on with brightness at level 50).

It behaves the same way no matter what the actual value of transition is. Just its presence changes the behavior. The same situation is also if the default transition is set in the device-specific options.

What did you expect to happen

I expect if sending an ON command to a light which is already on, nothing will happen. I definitely not expect that it should change the brightness and especially I don't expect that presence of transition parameter should change how it behaves.

How to reproduce it (minimal and precise)

Given a Philips White Ambiance bulb (I only have Philips Hue bulbs, no other manufacturer to test) without default transition parameter in device-specific options, publishing one by one to its /set topic:

{"state": "ON", "brightness": 50} // turns on the light and sets the brightness to 50
{"state": "ON"}                   // correctly does nothing, as the light is already on
{"state": "ON", "transition": 1}  // incorrectly increases the brightness to max

Debug Info

zigbee2mqtt version: commit 26ad2a (version 1.6.0), was also present on 927c4db
CC253X firmware version: I think this is a software issue, but I can provide if necessary

From the log, I'd guess it's connected to the fact that the transition parameter changes the Zigbee command from:
Zigbee publish to device 'ambianceBulb3', genOnOff - on - {} - {"manufSpec":0,"disDefaultRsp":0} - 11
to:
Zigbee publish to device 'ambianceBulb3', genLevelCtrl - moveToLevelWithOnOff - {"level":255,"transtime":10} - {"manufSpec":0,"disDefaultRsp":0} - 11

The topic sounds similar to the #1260 but not the issue itself.

@Koenkk
Copy link
Owner

Koenkk commented Oct 28, 2019

Should be fixed in latest zigbee2mqtt dev.

@pepp86
Copy link

pepp86 commented Nov 3, 2019

Experiencing the same issue when switching lamps off with transition, brightness is set to 0 which makes some trouble in my installation.

@Koenkk
Copy link
Owner

Koenkk commented Nov 3, 2019

@pepp86 I guess it depends on the bulb, why dont you leave out the transition?

@pepp86
Copy link

pepp86 commented Nov 4, 2019

@Koenkk Having this issue on all devices supporting transition.

I want to use transition, so I can't leave it out!?

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Nov 5, 2019
@Koenkk
Copy link
Owner

Koenkk commented Nov 5, 2019

@copystring @pepp86 your issue should be fixed in latest dev, please check and confirm.

@copystring
Copy link

Seems to work. It remembers the brightness.

@Koenkk
Copy link
Owner

Koenkk commented Nov 7, 2019

Thanks, assuming this can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants