22 #ifndef INCLUDE_HUEPLUSPLUS_ZLL_SENSORS_H 23 #define INCLUDE_HUEPLUSPLUS_ZLL_SENSORS_H 64 static constexpr
const char*
typeStr =
"ZGPSwitch";
86 bool hasBatteryState()
const;
89 int getBatteryState()
const;
93 Alert getLastAlert()
const;
99 void sendAlert(
Alert type);
102 bool isReachable()
const;
115 static constexpr
int c_ON_INITIAL_PRESS = 1000;
117 static constexpr
int c_ON_HOLD = 1001;
119 static constexpr
int c_ON_SHORT_RELEASED = 1002;
121 static constexpr
int c_ON_LONG_RELEASED = 1003;
123 static constexpr
int c_UP_INITIAL_PRESS = 2000;
125 static constexpr
int c_UP_HOLD = 2001;
127 static constexpr
int c_UP_SHORT_RELEASED = 2002;
129 static constexpr
int c_UP_LONG_RELEASED = 2003;
131 static constexpr
int c_DOWN_INITIAL_PRESS = 3000;
133 static constexpr
int c_DOWN_HOLD = 3001;
135 static constexpr
int c_DOWN_SHORT_RELEASED = 3002;
137 static constexpr
int c_DOWN_LONG_RELEASED = 3003;
139 static constexpr
int c_OFF_INITIAL_PRESS = 4000;
141 static constexpr
int c_OFF_HOLD = 4001;
143 static constexpr
int c_OFF_SHORT_RELEASED = 4002;
145 static constexpr
int c_OFF_LONG_RELEASED = 4003;
148 static constexpr
const char*
typeStr =
"ZLLSwitch";
170 bool hasBatteryState()
const;
173 int getBatteryState()
const;
177 Alert getLastAlert()
const;
183 void sendAlert(
Alert type);
186 bool isReachable()
const;
189 int getSensitivity()
const;
191 int getMaxSensitivity()
const;
194 void setSensitivity(
int sensitivity);
197 bool getPresence()
const;
205 static constexpr
const char*
typeStr =
"ZLLPresence";
227 bool hasBatteryState()
const;
230 int getBatteryState()
const;
234 Alert getLastAlert()
const;
240 void sendAlert(
Alert type);
243 bool isReachable()
const;
247 int getTemperature()
const;
255 static constexpr
const char*
typeStr =
"ZLLTemperature";
277 bool hasBatteryState()
const;
280 int getBatteryState()
const;
283 bool isReachable()
const;
286 int getDarkThreshold()
const;
293 void setDarkThreshold(
int threshold);
295 int getThresholdOffset()
const;
302 void setThresholdOffset(
int offset);
306 int getLightLevel()
const;
312 bool isDaylight()
const;
320 static constexpr
const char*
typeStr =
"ZLLLightLevel";
static constexpr int c_button1
Code for tap button 1.
Definition: ZLLSensors.h:55
ZigBee temperature sensor.
Definition: ZLLSensors.h:209
bool isOn() const
Check if sensor is on.
Definition: ZLLSensors.cpp:37
ZigBee sensor detecting ambient light level.
Definition: ZLLSensors.h:259
ZLLPresence(Sensor sensor)
Construct from generic sensor.
Definition: ZLLSensors.h:156
detail::ConditionHelper< bool > makeConditionDaylight(const ZLLLightLevel &sensor)
Definition: ZLLSensors.cpp:302
void setOn(bool on)
Enable or disable sensor.
Definition: ZLLSensors.cpp:42
Namespace for the hueplusplus library.
Definition: Action.h:27
Alert
Specifies light alert modes.
Definition: Sensor.h:38
ZigBee sensor reporting button presses.
Definition: ZLLSensors.h:68
Base class for physical devices connected to the bridge (sensor or light).
Definition: BaseDevice.h:35
Sensor detecting presence in the vicinity.
Definition: ZLLSensors.h:152
ZLLTemperature(Sensor sensor)
Construct from generic sensor.
Definition: ZLLSensors.h:213
ZGPSwitch(Sensor sensor)
Construct from generic sensor.
Definition: ZLLSensors.h:36
One-time, absolute time point.
Definition: TimePattern.h:72
static constexpr const char * typeStr
ZGPSwitch sensor type name.
Definition: ZLLSensors.h:64
static constexpr int c_button4
Code for tap button 4.
Definition: ZLLSensors.h:61
static constexpr int c_button3
Code for tap button 3.
Definition: ZLLSensors.h:59
Class for generic or unknown sensor types.
Definition: Sensor.h:59
ZigBee Green Power sensor for button presses.
Definition: ZLLSensors.h:32
ZLLSwitch(Sensor sensor)
Construct from generic sensor.
Definition: ZLLSensors.h:72
ZLLLightLevel(Sensor sensor)
Construct from generic sensor.
Definition: ZLLSensors.h:263
static constexpr int c_button2
Code for tap button 2.
Definition: ZLLSensors.h:57
int getButtonEvent() const
Get the code of the last switch event.
Definition: ZLLSensors.cpp:47
detail::ConditionHelper< bool > makeConditionDark(const ZLLLightLevel &sensor)
Definition: ZLLSensors.cpp:297
detail::ConditionHelper< int > makeConditionLightLevel(const ZLLLightLevel &sensor)
Definition: ZLLSensors.cpp:307