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

[homekit] fix group handling #8058

Merged
merged 4 commits into from
Jul 15, 2020
Merged

[homekit] fix group handling #8058

merged 4 commits into from
Jul 15, 2020

Conversation

yfre
Copy link
Contributor

@yfre yfre commented Jul 3, 2020

PR #7967 creates sometimes one accessory twice:
there are following cases that should be supported:

  1. one accessory defined using group, light switch tagged as "OnState" characteristic
Group  gLight 	"Light Group" {homekit="Lighting"}
Switch light   "Light" (gLight) {homekit="OnState"}
  1. one accessory defined using group, light switch tagged as "Lighting.OnState" characteristic
Group  gLight 	"Light Group" {homekit="Lighting"}
Switch light   "Light" (gLight) {homekit="Lighting.OnState"}
  1. two accessories: first = group itself, second = switch (switch can be tagged as "Lighting" or "Lighting.OnState")
Group:Switch:OR(ON,OFF)  gLight "Light Group" {homekit="Lighting"}
Switch light   "Light" (gLight)  {homekit="Lighting..OnState"}
  1. and 3) were working correctly, but in case of 2) it has created 2 accessories, one = group+switch, second = switch

this PR fixes the 2) case. all 3 cases are tested and working correctly. added comment describing the cases

Signed-off-by: Eugen Freiter [email protected]

Signed-off-by: Eugen Freiter <[email protected]>
@yfre yfre added the bug An unexpected problem or unintended behavior of an add-on label Jul 3, 2020
@yfre yfre requested a review from J-N-K July 6, 2020 09:22
@J-N-K
Copy link
Member

J-N-K commented Jul 7, 2020

Is this behavior properly documented in the README?

Signed-off-by: Eugen Freiter <[email protected]>
@yfre
Copy link
Contributor Author

yfre commented Jul 8, 2020

Is this behavior properly documented in the README?

it seems to be expected behaviour and it was working that way before. This PR fixes basically a bug.
but i have added an example to a README so that different ways of using groups are more clear.

@openhab openhab deleted a comment from TravisBuddy Jul 10, 2020
@openhab openhab deleted a comment from TravisBuddy Jul 13, 2020
@TravisBuddy
Copy link

Travis tests have failed

Hey @yfre,
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.

@openhab openhab deleted a comment from TravisBuddy Jul 13, 2020
@yfre
Copy link
Contributor Author

yfre commented Jul 15, 2020

@J-N-K i have updated the documentation. is anything else open here? i would love to merge this before 2.6.7 as it is pretty ugly bug

@J-N-K
Copy link
Member

J-N-K commented Jul 15, 2020

Travis fails in Java11 build while using SAT.

@J-N-K J-N-K merged commit f058445 into openhab:2.5.x Jul 15, 2020
@J-N-K J-N-K added this to the 2.5.7 milestone Jul 15, 2020
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this pull request Aug 3, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: MPH80 <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
Signed-off-by: Daan Meijer <[email protected]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
* fix group handling

Signed-off-by: Eugen Freiter <[email protected]>
@yfre yfre deleted the fix_group_handling branch November 15, 2022 21:52
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