Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit f770cb5

Browse files
ilcatoaentinger
authored andcommitted
Fix automation types
1 parent 7ab6a34 commit f770cb5

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/types/automation/CloudColoredLight.h

Lines changed: 1 addition & 7 deletions
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);

src/types/automation/CloudDimmeredLight.h

Lines changed: 1 addition & 6 deletions
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)