[homekit] Fix linking a Lighting to a Group:Dimmer (#17139)

Signed-off-by: Cody Cutrer <cody@cutrer.us>
This commit is contained in:
Cody Cutrer 2024-07-24 01:08:08 -06:00 committed by GitHub
parent 730333193d
commit 0158befacc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -97,7 +97,7 @@ public class HomekitOHItemProxy {
final PercentType brightness = (PercentType) commandCache.remove(BRIGHTNESS_COMMAND);
final DecimalType hue = (DecimalType) commandCache.remove(HUE_COMMAND);
final PercentType saturation = (PercentType) commandCache.remove(SATURATION_COMMAND);
final @Nullable OnOffType currentOnState = ((DimmerItem) item).getStateAs(OnOffType.class);
final @Nullable OnOffType currentOnState = item.getStateAs(OnOffType.class);
if (on != null) {
// always sends OFF.
// sends ON only if