19#ifndef SRC_SUPLA_CONTROL_LIGHT_RELAY_H_
20#define SRC_SUPLA_CONTROL_LIGHT_RELAY_H_
22#include <supla-common/proto.h>
29class LightRelay :
public Relay {
32 explicit LightRelay(
int pin,
bool highIsOn =
true);
37 void turnOn(_supla_int_t duration = 0);
42 _supla_int_t turnOnSecondsCumulative;
43 uint32_t turnOnTimestamp;
void onSaveState()
Method called periodically during SuplaDevice iteration.
Definition light_relay.cpp:110
void iterateAlways()
Method called on each SuplaDevice iteration.
Definition light_relay.cpp:124
int handleCalcfgFromServer(TSD_DeviceCalCfgRequest *request)
Handles CALCFG requests from server.
Definition light_relay.cpp:69
void handleGetChannelState(TDSC_ChannelState *channelState)
Handles "get channel state (i)" request from server.
Definition light_relay.cpp:61
void onLoadState()
Second method called on element in SuplaDevice.begin().
Definition light_relay.cpp:94