SinricPro Library
PowerLevelController< T >

PowerLevelController. More...

Inheritance diagram for PowerLevelController< T >:

Public Member Functions

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

Detailed Description

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

PowerLevelController.

Member Function Documentation

◆ onAdjustPowerLevel()

void onAdjustPowerLevel ( AdjustPowerLevelCallback  cb)

Set callback function for adjustPowerLevel request.

Parameters
cbFunction pointer to a AdjustPowerLevelCallback function
See also
AdjustPowerLevelCallback

◆ onPowerLevel()

void onPowerLevel ( SetPowerLevelCallback  cb)

Set callback function for setPowerLevel request.

Parameters
cbFunction pointer to a SetPowerLevelCallback function
See also
SetPowerLevelCallback

◆ sendPowerLevelEvent()

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