Skip to content

Commit e1a17e4

Browse files
ilcatoaentinger
authored andcommitted
Fix automation types
1 parent bdb7bfa commit e1a17e4

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

types/automation/CloudColoredLight.h

+1-7
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,7 @@ class CloudColoredLight : public CloudColor {
8686
appendAttribute(_value.swi);
8787
appendAttribute(_value.hue);
8888
appendAttribute(_value.sat);
89-
// To allow visualization through color widget
90-
if (_value.swi) {
91-
appendAttribute(_value.bri);
92-
} else {
93-
float bri = 0;
94-
appendAttributeReal(bri, getAttributeName(".bri", '.'), encoder);
95-
}
89+
appendAttribute(_value.bri);
9690
}
9791
virtual void setAttributesFromCloud() {
9892
setAttribute(_cloud_value.swi);

types/automation/CloudDimmeredLight.h

+1-6
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,7 @@ class CloudDimmeredLight : public ArduinoCloudProperty {
9090
float sat = 0;
9191
appendAttributeReal(hue, getAttributeName(".hue", '.'), encoder);
9292
appendAttributeReal(sat, getAttributeName(".sat", '.'), encoder);
93-
if (_value.swi) {
94-
appendAttribute(_value.bri);
95-
} else {
96-
float bri = 0;
97-
appendAttributeReal(bri, getAttributeName(".bri", '.'), encoder);
98-
}
93+
appendAttribute(_value.bri);
9994
// should be only:
10095
// appendAttribute(_value.bri);
10196
// end

0 commit comments

Comments
 (0)