Skip to content

Commit 279a98e

Browse files
Fabrizio Mirabitoaentinger
Fabrizio Mirabito
authored andcommitted
Add setters for tv switch, mute and volume
1 parent 6185636 commit 279a98e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

types/automation/CloudTelevision.h

+15
Original file line numberDiff line numberDiff line change
@@ -168,14 +168,29 @@ class CloudTelevision : public ArduinoCloudProperty {
168168
return _value;
169169
}
170170

171+
void setSwitch(bool const swi) {
172+
_value.swi = swi;
173+
updateLocalTimestamp();
174+
}
175+
171176
bool getSwitch() {
172177
return _value.swi;
173178
}
174179

180+
void setSwitch(uint8_t const vol) {
181+
_value.vol = vol;
182+
updateLocalTimestamp();
183+
}
184+
175185
uint8_t getVolume() {
176186
return _value.vol;
177187
}
178188

189+
void setMute(bool const mut) {
190+
_value.mut = mut;
191+
updateLocalTimestamp();
192+
}
193+
179194
bool getMute() {
180195
return _value.mut;
181196
}

0 commit comments

Comments
 (0)