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

[hue] Keep compatibility with hue emulation for groups #7809

Merged
merged 1 commit into from
May 27, 2020

Conversation

lolodomo
Copy link
Contributor

Signed-off-by: Laurent Garnier lg.hc@free.fr

@lolodomo lolodomo requested a review from cweitkamp as a code owner May 27, 2020 20:33
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@TravisBuddy
Copy link

Travis tests have failed

Hey @lolodomo,
please read the following log in order to understand the failure reason. There might also be some helpful tips along the way.
It will be awesome if you fix what is wrong and commit the changes.

@@ -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();
Copy link
Contributor

Choose a reason for hiding this comment

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

Why a new state?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

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

understood

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

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

LGTM

@cpmeister cpmeister merged commit 0b0db80 into openhab:2.5.x May 27, 2020
@cpmeister cpmeister added the bug An unexpected problem or unintended behavior of an add-on label May 27, 2020
@cpmeister cpmeister added this to the 2.5.6 milestone May 27, 2020
@lolodomo lolodomo deleted the hue_groupstate branch May 27, 2020 22:43
Dries-Vandenneucker added a commit to Dries-Vandenneucker/openhab-addons that referenced this pull request May 31, 2020
* 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)
  ...
J-N-K pushed a commit to J-N-K/openhab-addons that referenced this pull request Jul 14, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: CSchlipp <christian@schlipp.de>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants