19#ifndef SRC_SUPLA_CONTROL_LIGHT_RELAY_H_
20#define SRC_SUPLA_CONTROL_LIGHT_RELAY_H_
22#include <supla-common/proto.h>
28class LightRelay :
public Relay {
30 explicit LightRelay(
int pin,
bool highIsOn =
true);
35 void turnOn(_supla_int_t duration = 0);
40 _supla_int_t turnOnSecondsCumulative;
41 uint32_t turnOnTimestamp;
void onSaveState()
Method called periodically during SuplaDevice iteration.
Definition light_relay.cpp:95
void iterateAlways()
Method called on each SuplaDevice iteration.
Definition light_relay.cpp:109
int handleCalcfgFromServer(TSD_DeviceCalCfgRequest *request)
Handles CALCFG requests from server.
Definition light_relay.cpp:54
void handleGetChannelState(TDSC_ChannelState *channelState)
Handles "get channel state (i)" request from server.
Definition light_relay.cpp:46
void onLoadState()
Second method called on element in SuplaDevice.begin().
Definition light_relay.cpp:79