@@ -35,7 +35,7 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
3535 # 0x0005: inherited # Scenes 1.4 p.30 - no writable
3636 # 0x0006: inherited # On/Off 1.5 p.48
3737 # 0x0008: inherited # Level Control 1.6 p.57
38- 0x0300 : [ 7 ,8 ,0xF ,0x400B ,0x400C ] , # Color Control 3.2 p.111
38+ 0x0300 : [ 7 ,8 ,0xF ,0x10 , 0x4001 , 0x400A , 0x400B ,0x400C ] , # Color Control 3.2 p.111
3939 })
4040 static var UPDATE_COMMANDS = matter.UC_LIST ( _class, "CT" )
4141 static var TYPES = { 0x010C : 2 } # Color Temperature Light
@@ -135,16 +135,24 @@ class Matter_Plugin_Light2 : Matter_Plugin_Light1
135135 if cluster == 0x0300 # ========== Color Control 3.2 p.111 ==========
136136 self .update_shadow_lazy ()
137137 if attribute == 0x0007 # ---------- ColorTemperatureMireds / u2 ----------
138- return tlv_solo.set_or_nil ( TLV.U1 , self .shadow_ct ) # if `nil` it is replaced with TLV.NULL
138+ return tlv_solo.set_or_nil ( TLV.U2 , self .shadow_ct ) # if `nil` it is replaced with TLV.NULL
139139 elif attribute == 0x0008 # ---------- ColorMode / u1 ----------
140- return tlv_solo.set ( TLV.U1 , 2 ) # 2 = ColorTemperatureMireds
140+ return tlv_solo.set ( TLV.U1 , 2 ) # 2 = ColorTemperatureMireds
141141 elif attribute == 0x000F # ---------- Options / u1 ----------
142142 return tlv_solo.set ( TLV.U1 , 0 )
143+ elif attribute == 0x4001 # ---------- EnhancedColorMode / u1 ----------
144+ return tlv_solo.set ( TLV.U1 , 2 ) # 2 = ColorTemperatureMireds
145+ elif attribute == 0x400A # ---------- ColorCapabilities / map2 ----------
146+ return tlv_solo.set ( TLV.U2 , 0x10 ) # CT
143147 elif attribute == 0x400B # ---------- ColorTempPhysicalMinMireds / u2 ----------
144- return tlv_solo.set ( TLV.U1 , self .ct_min )
148+ return tlv_solo.set ( TLV.U2 , self .ct_min )
145149 elif attribute == 0x400C # ---------- ColorTempPhysicalMaxMireds / u2 ----------
146- return tlv_solo.set ( TLV.U1 , self .ct_max )
150+ return tlv_solo.set ( TLV.U2 , self .ct_max )
147151
152+ # Defined Primaries Information Attribute Set
153+ elif attribute == 0x0010 # ---------- NumberOfPrimaries / u1 ----------
154+ return tlv_solo.set ( TLV.U1 , 0 )
155+
148156 elif attribute == 0xFFFC # ---------- FeatureMap / map32 ----------
149157 return tlv_solo.set ( TLV.U4 , 0x10 ) # CT
150158 end
0 commit comments