SinricPro Library
Loading...
Searching...
No Matches
ContactSensor.h
1#pragma once
2
3#include "../EventLimiter.h"
4#include "../SinricProStrings.h"
5
6#include "../SinricProNamespace.h"
7namespace SINRICPRO_NAMESPACE {
8
9FSTR(CONTACT, setContactState); // "setContactState"
10FSTR(CONTACT, state); // "state"
11FSTR(CONTACT, closed); // "closed"
12FSTR(CONTACT, open); // "open"
13
18template <typename T>
20 public:
23 private:
24 EventLimiter event_limiter;
25};
26
27template <typename T>
29: event_limiter(EVENT_LIMIT_SENSOR_STATE) {}
30
39template <typename T>
49
50} // SINRICPRO_NAMESPACE
51
52template <typename T>
53using ContactSensor = SINRICPRO_NAMESPACE::ContactSensor<T>;
AirQuality.
Definition AirQualitySensor.h:19
ContactSensor.
Definition ContactSensor.h:19
bool sendContactEvent(bool detected, String cause=FSTR_SINRICPRO_PHYSICAL_INTERACTION)
Send setContactState event to SinricPro Server indicating actual power state.
Definition ContactSensor.h:40