@@ -141,7 +141,7 @@ describe('Extension: HomeAssistant', () => {
141141 name : null ,
142142 schema : 'json' ,
143143 state_topic : 'zigbee2mqtt/ha_discovery_group' ,
144- supported_color_modes : [ 'brightness' , ' xy', 'color_temp' ] ,
144+ supported_color_modes : [ 'xy' , 'color_temp' ] ,
145145 effect : true ,
146146 effect_list : [
147147 'blink' ,
@@ -165,6 +165,33 @@ describe('Extension: HomeAssistant', () => {
165165 qos : 1 ,
166166 } ) ;
167167
168+ payload = {
169+ availability : [ { topic : 'zigbee2mqtt/bridge/state' , value_template : '{{ value_json.state }}' } ] ,
170+ brightness : true ,
171+ brightness_scale : 254 ,
172+ command_topic : 'zigbee2mqtt/bulb_enddevice/set' ,
173+ device : {
174+ identifiers : [ 'zigbee2mqtt_0x0017880104e45553' ] ,
175+ manufacturer : 'Sengled' ,
176+ model : 'Element classic (A19)' ,
177+ model_id : 'E11-G13' ,
178+ name : 'bulb_enddevice' ,
179+ via_device : 'zigbee2mqtt_bridge_0x00124b00120144ae' ,
180+ } ,
181+ name : null ,
182+ object_id : 'bulb_enddevice' ,
183+ origin : origin ,
184+ schema : 'json' ,
185+ state_topic : 'zigbee2mqtt/bulb_enddevice' ,
186+ supported_color_modes : [ 'brightness' ] ,
187+ unique_id : '0x0017880104e45553_light_zigbee2mqtt' ,
188+ } ;
189+
190+ expect ( mockMQTTPublishAsync ) . toHaveBeenCalledWith ( 'homeassistant/light/0x0017880104e45553/light/config' , stringify ( payload ) , {
191+ retain : true ,
192+ qos : 1 ,
193+ } ) ;
194+
168195 payload = {
169196 availability : [ { topic : 'zigbee2mqtt/bridge/state' , value_template : '{{ value_json.state }}' } ] ,
170197 command_topic : 'zigbee2mqtt/ha_discovery_group/set' ,
@@ -381,7 +408,7 @@ describe('Extension: HomeAssistant', () => {
381408 availability : [ { topic : 'zigbee2mqtt/bridge/state' , value_template : '{{ value_json.state }}' } ] ,
382409 brightness : true ,
383410 brightness_scale : 254 ,
384- supported_color_modes : [ 'brightness' , ' color_temp'] ,
411+ supported_color_modes : [ 'color_temp' ] ,
385412 min_mireds : 250 ,
386413 max_mireds : 454 ,
387414 command_topic : 'zigbee2mqtt/bulb/set' ,
@@ -1633,7 +1660,7 @@ describe('Extension: HomeAssistant', () => {
16331660 name : null ,
16341661 schema : 'json' ,
16351662 state_topic : 'zigbee2mqtt/ha_discovery_group_new' ,
1636- supported_color_modes : [ 'brightness' , ' xy', 'color_temp' ] ,
1663+ supported_color_modes : [ 'xy' , 'color_temp' ] ,
16371664 effect : true ,
16381665 effect_list : [
16391666 'blink' ,
@@ -2101,7 +2128,7 @@ describe('Extension: HomeAssistant', () => {
21012128 name : null ,
21022129 schema : 'json' ,
21032130 state_topic : 'zigbee2mqtt/ha_discovery_group' ,
2104- supported_color_modes : [ 'brightness' , ' xy', 'color_temp' ] ,
2131+ supported_color_modes : [ 'xy' , 'color_temp' ] ,
21052132 effect : true ,
21062133 effect_list : [
21072134 'blink' ,
@@ -2145,7 +2172,7 @@ describe('Extension: HomeAssistant', () => {
21452172 name : null ,
21462173 schema : 'json' ,
21472174 state_topic : 'zigbee2mqtt/ha_discovery_group' ,
2148- supported_color_modes : [ 'brightness' , ' xy', 'color_temp' ] ,
2175+ supported_color_modes : [ 'xy' , 'color_temp' ] ,
21492176 effect : true ,
21502177 effect_list : [
21512178 'blink' ,
@@ -2200,7 +2227,7 @@ describe('Extension: HomeAssistant', () => {
22002227 name : null ,
22012228 schema : 'json' ,
22022229 state_topic : 'zigbee2mqtt/bulb' ,
2203- supported_color_modes : [ 'brightness' , ' color_temp'] ,
2230+ supported_color_modes : [ 'color_temp' ] ,
22042231 object_id : 'bulb' ,
22052232 unique_id : '0x000b57fffec6a5b2_light_zigbee2mqtt' ,
22062233 origin : origin ,
0 commit comments