@@ -42,16 +42,6 @@ class MatterColorTemperatureLight : public MatterEndPoint {
42
42
bool setColorTemperature (uint16_t newTemperature); // returns true if successful
43
43
uint16_t getColorTemperature (); // returns current temperature
44
44
45
- // used to update the state of the light using the current Matter Light internal state
46
- // It is necessary to set a user callback function using onChange() to handle the physical light state
47
- void updateAccessory ();
48
-
49
- operator bool (); // returns current on/off light state
50
- void operator =(bool state); // turns light on or off
51
-
52
- // this function is called by Matter internal event processor. It could be overwritten by the application, if necessary.
53
- bool attributeChangeCB (uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val);
54
-
55
45
// User Callback for whenever the Light On/Off state is changed by the Matter Controller
56
46
using EndPointOnOffCB = std::function<bool (bool )>;
57
47
void onChangeOnOff (EndPointOnOffCB onChangeCB) {
@@ -76,6 +66,16 @@ class MatterColorTemperatureLight : public MatterEndPoint {
76
66
_onChangeCB = onChangeCB;
77
67
}
78
68
69
+ // used to update the state of the light using the current Matter Light internal state
70
+ // It is necessary to set a user callback function using onChange() to handle the physical light state
71
+ void updateAccessory ();
72
+
73
+ operator bool (); // returns current on/off light state
74
+ void operator =(bool state); // turns light on or off
75
+
76
+ // this function is called by Matter internal event processor. It could be overwritten by the application, if necessary.
77
+ bool attributeChangeCB (uint16_t endpoint_id, uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *val);
78
+
79
79
protected:
80
80
bool started = false ;
81
81
bool onOffState = false ; // default initial state is off, but it can be changed by begin(bool)
0 commit comments