Skip to content

Commit

Permalink
Add xy-only light compatibility. Fix #219
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasloven committed Oct 30, 2021
1 parent 10bf0bf commit fbe9b46
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/controllers/light-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,15 @@ export class LightController extends Controller {
const support_hs =
attr.supported_features & 16 ||
attr.supported_color_modes?.some((mode) => ["hs"].includes(mode));
const support_xy = attr.supported_color_modes?.some((mode) =>
["xy"].includes(mode)
);
const support_brightness =
attr.supported_features & 1 ||
support_temp ||
support_rgb ||
support_hs ||
support_xy ||
attr.supported_color_modes?.some((mode) => ["brightness"].includes(mode));
const support_color = support_rgb || support_hs;

Expand Down

0 comments on commit fbe9b46

Please sign in to comment.