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

Add setters for CloudTelevision #50

Merged
merged 2 commits into from
Dec 11, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/types/automation/CloudColoredLight.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ class CloudColoredLight : public CloudColor {

void setSwitch(bool const swi) {
_value.swi = swi;
updateLocalTimestamp();
}

float getHue() {
Expand All @@ -90,6 +91,7 @@ class CloudColoredLight : public CloudColor {

void setHue(float const hue) {
_value.hue = hue;
updateLocalTimestamp();
}

float getSaturation() {
Expand All @@ -98,6 +100,7 @@ class CloudColoredLight : public CloudColor {

void setSaturation(float const sat) {
_value.sat = sat;
updateLocalTimestamp();
}

float getBrightness() {
Expand All @@ -106,6 +109,7 @@ class CloudColoredLight : public CloudColor {

void setBrightness(float const bri) {
_value.bri = bri;
updateLocalTimestamp();
}

virtual void fromCloudToLocal() {
Expand Down
15 changes: 15 additions & 0 deletions src/types/automation/CloudTelevision.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,29 @@ class CloudTelevision : public ArduinoCloudProperty {
return _value;
}

void setSwitch(bool const swi) {
_value.swi = swi;
updateLocalTimestamp();
}

bool getSwitch() {
return _value.swi;
}

void setSwitch(uint8_t const vol) {
_value.vol = vol;
updateLocalTimestamp();
}

uint8_t getVolume() {
return _value.vol;
}

void setMute(bool const mut) {
_value.mut = mut;
updateLocalTimestamp();
}

bool getMute() {
return _value.mut;
}
Expand Down