SinricPro Library
Loading...
Searching...
No Matches
PowerLevelController< T >

PowerLevelController. More...

#include <PowerLevelController.h>

Inheritance diagram for PowerLevelController< T >:

Public Member Functions

void onPowerLevel (SetPowerLevelCallback cb)
 Set callback function for setPowerLevel request.
 
void onAdjustPowerLevel (AdjustPowerLevelCallback cb)
 Set callback function for adjustPowerLevel request.
 
bool sendPowerLevelEvent (int powerLevel, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setPowerLevel event to SinricPro Server indicating actual power level.
 

Detailed Description

template<typename T>
class SINRICPRO_3_0_0::PowerLevelController< T >

PowerLevelController.

Member Function Documentation

◆ onAdjustPowerLevel()

template<typename T >
void onAdjustPowerLevel ( AdjustPowerLevelCallback  cb)

Set callback function for adjustPowerLevel request.

Parameters
cbFunction pointer to a AdjustPowerLevelCallback function
See also
AdjustPowerLevelCallback

◆ onPowerLevel()

template<typename T >
void onPowerLevel ( SetPowerLevelCallback  cb)

Set callback function for setPowerLevel request.

Parameters
cbFunction pointer to a SetPowerLevelCallback function
See also
SetPowerLevelCallback

◆ sendPowerLevelEvent()

template<typename T >
bool sendPowerLevelEvent ( int  powerLevel,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send setPowerLevel event to SinricPro Server indicating actual power level.

Parameters
powerLevelinteger 0..100 report the powerlevel that the device have been set to
cause(optional) Reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
the success of sending the event
Return values
trueevent has been sent successfully
falseevent has not been sent, maybe you sent to much events in a short distance of time