ToggleController.
More...
#include <ToggleController.h>
template<
typename T>
class SINRICPRO_3_0_0::ToggleController< T >
ToggleController.
◆ onToggleState()
Set callback function for toggleState
request.
- Parameters
-
instance | String instance name (custom device) |
cb | Function pointer to a ToggleStateCallback function |
- Returns
- void
- See also
- ToggleStateCallback
◆ sendToggleStateEvent()
Send setToggleState
event to SinricPro Server indicating actual toggle state.
- Parameters
-
instance | String instance name (custom device) |
state | true = state turned on
false = tate turned off |
cause | (optional) String reason why event is sent (default = "PHYSICAL_INTERACTION" ) |
- Returns
- the success of sending the even
- Return values
-
true | event has been sent successfully |
false | event has not been sent, maybe you sent to much events in a short distance of time |