Skip to content

Commit 8826eaa

Browse files
MihonariumKoenkk
andauthored
test: update Philips light fixtures for hue_native_control (#31785)
Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
1 parent c575e50 commit 8826eaa

4 files changed

Lines changed: 111 additions & 13 deletions

File tree

test/extensions/bridge.test.ts

Lines changed: 60 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ describe("Extension: Bridge", () => {
735735
values: ["off", "on", "toggle", "previous"],
736736
},
737737
{
738-
access: 2,
738+
access: 3,
739739
label: "Effect",
740740
name: "effect",
741741
property: "effect",
@@ -748,11 +748,40 @@ describe("Extension: Bridge", () => {
748748
"candle",
749749
"fireplace",
750750
"colorloop",
751+
"sunset",
752+
"sparkle",
753+
"opal",
754+
"glisten",
755+
"underwater",
756+
"cosmos",
757+
"sunbeam",
758+
"enchant",
759+
"none",
751760
"finish_effect",
752761
"stop_effect",
753762
"stop_hue_effect",
754763
],
755764
},
765+
{
766+
access: 3,
767+
description: "Animation speed for the active effect (0=slowest, 1=fastest)",
768+
label: "Effect speed",
769+
name: "effect_speed",
770+
property: "effect_speed",
771+
type: "numeric",
772+
value_max: 1,
773+
value_min: 0,
774+
value_step: 0.01,
775+
},
776+
{
777+
access: 2,
778+
description:
779+
'Set the base color of the active effect without stopping it (hex e.g. #FF4400, or JSON {"x":0.6,"y":0.3})',
780+
label: "Effect color",
781+
name: "effect_color",
782+
property: "effect_color",
783+
type: "text",
784+
},
756785
{
757786
access: 1,
758787
category: "diagnostic",
@@ -768,6 +797,27 @@ describe("Extension: Bridge", () => {
768797
],
769798
model: "7146060PH",
770799
options: [
800+
{
801+
access: 2,
802+
description:
803+
"Control this light using a Philips-specific protocol instead of standard Zigbee commands. When enabled, on/off, brightness, color, and color temperature are combined into single atomic commands. This is required to use the Effect color update mode. When disabled (default), standard Zigbee commands are used, which preserves the usual behavior, including simulating on/off transitions.",
804+
label: "Hue native control",
805+
name: "hue_native_control",
806+
property: "hue_native_control",
807+
type: "binary",
808+
value_off: false,
809+
value_on: true,
810+
},
811+
{
812+
access: 2,
813+
description:
814+
"Controls what happens when color is changed while an effect is active (requires Hue native control). 'stop' (default): color change stops the effect (Hue app behavior). 'update': color change re-sends the effect with the new color.",
815+
label: "Effect color mode",
816+
name: "effect_color_mode",
817+
property: "effect_color_mode",
818+
type: "enum",
819+
values: ["stop", "update"],
820+
},
771821
{
772822
access: 2,
773823
description:
@@ -781,21 +831,21 @@ describe("Extension: Bridge", () => {
781831
},
782832
{
783833
access: 2,
784-
description:
785-
"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
786-
label: "Color sync",
787-
name: "color_sync",
788-
property: "color_sync",
834+
description: "State actions will also be published as 'action' when true (default false).",
835+
label: "State action",
836+
name: "state_action",
837+
property: "state_action",
789838
type: "binary",
790839
value_off: false,
791840
value_on: true,
792841
},
793842
{
794843
access: 2,
795-
description: "State actions will also be published as 'action' when true (default false).",
796-
label: "State action",
797-
name: "state_action",
798-
property: "state_action",
844+
description:
845+
"When enabled colors will be synced, e.g. if the light supports both color x/y and color temperature a conversion from color x/y to color temperature will be done when setting the x/y color (default true).",
846+
label: "Color sync",
847+
name: "color_sync",
848+
property: "color_sync",
799849
type: "binary",
800850
value_off: false,
801851
value_on: true,

test/extensions/frontend.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ describe("Extension: Frontend", () => {
245245
stringify({
246246
state: "ON",
247247
effect: null,
248+
effect_color: null,
249+
effect_speed: null,
248250
power_on_behavior: null,
249251
linkquality: 20,
250252
update: {state: null, installed_version: -1, latest_version: -1},
@@ -269,6 +271,8 @@ describe("Extension: Frontend", () => {
269271
state: "ON",
270272
power_on_behavior: null,
271273
effect: null,
274+
effect_color: null,
275+
effect_speed: null,
272276
linkquality: 20,
273277
update: {state: null, installed_version: -1, latest_version: -1},
274278
},
@@ -296,6 +300,8 @@ describe("Extension: Frontend", () => {
296300
brightness: 90,
297301
power_on_behavior: null,
298302
effect: null,
303+
effect_color: null,
304+
effect_speed: null,
299305
linkquality: 20,
300306
update: {state: null, installed_version: -1, latest_version: -1},
301307
},

test/extensions/homeassistant.test.ts

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,15 @@ describe("Extension: HomeAssistant", () => {
164164
"candle",
165165
"fireplace",
166166
"colorloop",
167+
"sunset",
168+
"sparkle",
169+
"opal",
170+
"glisten",
171+
"underwater",
172+
"cosmos",
173+
"sunbeam",
174+
"enchant",
175+
"none",
167176
"finish_effect",
168177
"stop_effect",
169178
"stop_hue_effect",
@@ -1561,6 +1570,8 @@ describe("Extension: HomeAssistant", () => {
15611570
color: {hue: 0, saturation: 100, h: 0, s: 100},
15621571
color_mode: "hs",
15631572
effect: null,
1573+
effect_color: null,
1574+
effect_speed: null,
15641575
linkquality: null,
15651576
state: null,
15661577
power_on_behavior: null,
@@ -1584,6 +1595,8 @@ describe("Extension: HomeAssistant", () => {
15841595
color: {x: 0.4576, y: 0.41},
15851596
color_mode: "xy",
15861597
effect: null,
1598+
effect_color: null,
1599+
effect_speed: null,
15871600
linkquality: null,
15881601
state: null,
15891602
power_on_behavior: null,
@@ -1606,6 +1619,8 @@ describe("Extension: HomeAssistant", () => {
16061619
stringify({
16071620
linkquality: null,
16081621
effect: null,
1622+
effect_color: null,
1623+
effect_speed: null,
16091624
state: "ON",
16101625
power_on_behavior: null,
16111626
update: {state: null, installed_version: -1, latest_version: -1},
@@ -1968,6 +1983,15 @@ describe("Extension: HomeAssistant", () => {
19681983
"candle",
19691984
"fireplace",
19701985
"colorloop",
1986+
"sunset",
1987+
"sparkle",
1988+
"opal",
1989+
"glisten",
1990+
"underwater",
1991+
"cosmos",
1992+
"sunbeam",
1993+
"enchant",
1994+
"none",
19711995
"finish_effect",
19721996
"stop_effect",
19731997
"stop_hue_effect",
@@ -2438,6 +2462,15 @@ describe("Extension: HomeAssistant", () => {
24382462
"candle",
24392463
"fireplace",
24402464
"colorloop",
2465+
"sunset",
2466+
"sparkle",
2467+
"opal",
2468+
"glisten",
2469+
"underwater",
2470+
"cosmos",
2471+
"sunbeam",
2472+
"enchant",
2473+
"none",
24412474
"finish_effect",
24422475
"stop_effect",
24432476
"stop_hue_effect",
@@ -2484,6 +2517,15 @@ describe("Extension: HomeAssistant", () => {
24842517
"candle",
24852518
"fireplace",
24862519
"colorloop",
2520+
"sunset",
2521+
"sparkle",
2522+
"opal",
2523+
"glisten",
2524+
"underwater",
2525+
"cosmos",
2526+
"sunbeam",
2527+
"enchant",
2528+
"none",
24872529
"finish_effect",
24882530
"stop_effect",
24892531
"stop_hue_effect",

test/extensions/networkMap.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ describe("Extension: NetworkMap", () => {
286286
description: "Hue Go",
287287
model: "7146060PH",
288288
supports:
289-
"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, linkquality",
289+
"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, effect_speed, effect_color, linkquality",
290290
vendor: "Philips",
291291
},
292292
failed: [],
@@ -616,7 +616,7 @@ describe("Extension: NetworkMap", () => {
616616
description: "Hue Go",
617617
model: "7146060PH",
618618
supports:
619-
"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, linkquality",
619+
"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, effect_speed, effect_color, linkquality",
620620
vendor: "Philips",
621621
},
622622
failed: [],
@@ -785,7 +785,7 @@ describe("Extension: NetworkMap", () => {
785785
description: "Hue Go",
786786
model: "7146060PH",
787787
supports:
788-
"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, linkquality",
788+
"light (state, brightness, color_temp, color_temp_startup, color_xy, color_hs), power_on_behavior, effect, effect_speed, effect_color, linkquality",
789789
vendor: "Philips",
790790
},
791791
failed: [],

0 commit comments

Comments
 (0)