Skip to content

Commit bc8d6e3

Browse files
committed
Adding CHECK_CBOR statements where they've been previously missing
1 parent 39a78e6 commit bc8d6e3

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

src/property/types/automation/CloudColoredLight.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,11 @@ class CloudColoredLight : public CloudColor {
119119
_cloud_value = _value;
120120
}
121121
virtual CborError appendAttributesToCloud() {
122-
appendAttribute(_value.swi);
123-
appendAttribute(_value.hue);
124-
appendAttribute(_value.sat);
125-
appendAttribute(_value.bri);
122+
CHECK_CBOR(appendAttribute(_value.swi));
123+
CHECK_CBOR(appendAttribute(_value.hue));
124+
CHECK_CBOR(appendAttribute(_value.sat));
125+
CHECK_CBOR(appendAttribute(_value.bri));
126+
return CborNoError;
126127
}
127128
virtual void setAttributesFromCloud() {
128129
setAttribute(_cloud_value.swi);

src/property/types/automation/CloudDimmedLight.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,13 @@ class CloudDimmedLight : public Property {
104104
// Start
105105
float hue = 0;
106106
float sat = 0;
107-
appendAttributeReal(hue, getAttributeName(".hue", '.'), encoder);
108-
appendAttributeReal(sat, getAttributeName(".sat", '.'), encoder);
109-
appendAttribute(_value.bri);
107+
CHECK_CBOR(appendAttributeReal(hue, getAttributeName(".hue", '.'), encoder));
108+
CHECK_CBOR(appendAttributeReal(sat, getAttributeName(".sat", '.'), encoder));
109+
CHECK_CBOR(appendAttribute(_value.bri));
110110
// should be only:
111111
// appendAttribute(_value.bri);
112112
// end
113+
return CborNoError;
113114
}
114115

115116
virtual void setAttributesFromCloud() {

src/property/types/automation/CloudTelevision.h

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,13 @@ class CloudTelevision : public Property {
214214
_cloud_value = _value;
215215
}
216216
virtual CborError appendAttributesToCloud() {
217-
appendAttribute(_value.swi);
218-
appendAttribute(_value.vol);
219-
appendAttribute(_value.mut);
220-
appendAttribute((int)_value.pbc);
221-
appendAttribute((int)_value.inp);
222-
appendAttribute(_value.cha);
217+
CHECK_CBOR(appendAttribute(_value.swi));
218+
CHECK_CBOR(appendAttribute(_value.vol));
219+
CHECK_CBOR(appendAttribute(_value.mut));
220+
CHECK_CBOR(appendAttribute((int)_value.pbc));
221+
CHECK_CBOR(appendAttribute((int)_value.inp));
222+
CHECK_CBOR(appendAttribute(_value.cha));
223+
return CborNoError;
223224
}
224225
virtual void setAttributesFromCloud() {
225226
setAttribute(_cloud_value.swi);

0 commit comments

Comments
 (0)