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

ContactSensor. More...

#include <ContactSensor.h>

Inheritance diagram for ContactSensor< T >:

Public Member Functions

bool sendContactEvent (bool detected, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
 Send setContactState event to SinricPro Server indicating actual power state.
 

Detailed Description

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

ContactSensor.

Member Function Documentation

◆ sendContactEvent()

template<typename T >
bool sendContactEvent ( bool  detected,
String  cause = FSTR_SINRICPRO_PHYSICAL_INTERACTION 
)

Send setContactState event to SinricPro Server indicating actual power state.

Parameters
detected[in] booltrue = contact is closed
[in] false = contact is open
cause[in] String reason why event is sent (default = "PHYSICAL_INTERACTION")
Returns
true event has been sent successfully
false event has not been sent, maybe you sent to much events in a short distance of time