Skip to content

Commit bdb7bfa

Browse files
mirkokurtaentinger
authored andcommitted
Added tests for home automation types
1 parent 061268e commit bdb7bfa

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

types/automation/CloudContactSensor.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
class CloudContactSensor : public CloudBool {
3535
private:
3636
public:
37+
operator bool() const {
38+
return _value;
39+
}
3740
CloudContactSensor& operator=(bool v) {
3841
CloudBool::operator=(v);
3942
return *this;

types/automation/CloudLight.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
class CloudLight : public CloudBool {
3535
private:
3636
public:
37+
operator bool() const {
38+
return _value;
39+
}
3740
CloudLight& operator=(bool v) {
3841
CloudBool::operator=(v);
3942
return *this;

types/automation/CloudMotionSensor.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
class CloudMotionSensor : public CloudBool {
3535
private:
3636
public:
37+
operator bool() const {
38+
return _value;
39+
}
3740
CloudMotionSensor& operator=(bool v) {
3841
CloudBool::operator=(v);
3942
return *this;

types/automation/CloudSmartPlug.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
class CloudSmartPlug : public CloudBool {
3535
private:
3636
public:
37+
operator bool() const {
38+
return _value;
39+
}
3740
CloudSmartPlug& operator=(bool v) {
3841
CloudBool::operator=(v);
3942
return *this;

types/automation/CloudSwitch.h

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
class CloudSwitch : public CloudBool {
3535
private:
3636
public:
37+
operator bool() const {
38+
return _value;
39+
}
3740
CloudSwitch& operator=(bool v) {
3841
CloudBool::operator=(v);
3942
return *this;

0 commit comments

Comments
 (0)