-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[hue] Keep compatibility with hue emulation for groups #7809
Conversation
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Travis tests have failedHey @lolodomo, |
@@ -238,7 +238,7 @@ protected void doConnectedRun() throws IOException, ApiException { | |||
Map<String, FullGroup> lastGroupStateCopy = new HashMap<>(lastGroupStates); | |||
|
|||
for (final FullGroup fullGroup : hueBridge.getGroups()) { | |||
State groupState = fullGroup.getState(); | |||
State groupState = new State(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why a new state?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this state is not returned by the API.
In fact, for groups, the hue bridge is returning a state object but this is a different object than the one we map in class State (the state for lights). This is the reason why there was no NPE with the hue bridge. But with the hue emulation binding, fullGroup.getState() is null and this leads to a NPE few lines below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
understood
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* 2.5.x: (174 commits) [hpprinter] Add additional data points and refactoring (openhab#7805) [neohub] new/legacy API; null annotations; enhancements; bugs; logging (openhab#7767) [meteoalerte] Initial contribution (openhab#7200) [lgwebos] Console command to show the access key (openhab#7801) [hue] Refactored state handling and fix polling after command (openhab#7518) [telegram] add attachment URL (openhab#7816) [siemensrds] readme adjusted to match openhab#7814 (openhab#7819) [lametrictime] correctly parse response (openhab#7818) [Seneye] Bug fix for using Pond or Home sensors. (openhab#7797) [siemensrds] apply UoM quantityType percent for relative humidity (openhab#7814) [alarmdecoder] Add vzone thing for virtual zone control (openhab#7800) [hue] Channel alert added for groups (openhab#7810) [hue] Keep compatibility with hue emulation for groups (openhab#7809) [dscalarm] Bridge/things management refactored (openhab#7748) [avmfritz] Add link to Fensterkontakt (magnetisch) to docs (openhab#7806) [deconz] add light/blind support and additional sensors (openhab#7608) [homekit] add support for min/max values for temperature (openhab#7782) [tesla] Use CXF JAX-RS client builder, if available (openhab#7804) [mqtt.homie] Improve Homie discovery time (openhab#7760) [siemensrds] null annotations; JUnit; UoM; enhancements; bug; refactoring; logging (openhab#7769) ...
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: CSchlipp <christian@schlipp.de>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier lg.hc@free.fr