22 #ifndef INCLUDE_HUEPLUSPLUS_CLIP_SENSORS_H 23 #define INCLUDE_HUEPLUSPLUS_CLIP_SENSORS_H 66 std::string
getURL()
const;
72 void setURL(
const std::string& url);
92 int getButtonEvent()
const;
98 void setButtonEvent(
int code);
101 static constexpr
const char* typeStr =
"CLIPSwitch";
120 void setOpen(
bool open);
123 static constexpr
const char* typeStr =
"CLIPOpenClose";
136 bool getPresence()
const;
142 void setPresence(
bool presence);
145 static constexpr
const char* typeStr =
"CLIPPresence";
157 int getTemperature()
const;
164 void setTemperature(
int temperature);
167 static constexpr
const char* typeStr =
"CLIPTemperature";
179 int getHumidity()
const;
186 void setHumidity(
int humidity);
189 static constexpr
const char* typeStr =
"CLIPHumidity";
202 int getDarkThreshold()
const;
209 void setDarkThreshold(
int threshold);
212 int getThresholdOffset()
const;
219 void setThresholdOffset(
int offset);
223 int getLightLevel()
const;
230 void setLightLevel(
int level);
236 bool isDaylight()
const;
239 static constexpr
const char* typeStr =
"CLIPLightLevel";
252 bool getFlag()
const;
258 void setFlag(
bool flag);
261 static constexpr
const char* typeStr =
"CLIPGenericFlag";
276 int getStatus()
const;
282 void setStatus(
int status);
285 static constexpr
const char* typeStr =
"CLIPGenericStatus";
bool isReachable() const
Check whether the sensor is reachable.
Definition: CLIPSensors.cpp:51
void setOn(bool on)
Enable or disable sensor.
Definition: CLIPSensors.cpp:35
CLIP sensor to detect presence.
Definition: CLIPSensors.h:129
CLIP sensor for button presses.
Definition: CLIPSensors.h:85
CLIP sensor for humidity.
Definition: CLIPSensors.h:171
CLIPGenericStatus(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:273
void setURL(const std::string &url)
Set sensor URL.
Definition: CLIPSensors.cpp:64
void setBatteryState(int percent)
Set battery state.
Definition: CLIPSensors.cpp:47
Namespace for the hueplusplus library.
Definition: Action.h:27
detail::ConditionHelper< bool > makeCondition(const CLIPOpenClose &sensor)
Definition: CLIPSensors.cpp:103
CLIPLightLevel(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:199
bool hasURL() const
Check whether the sensor has a URL.
Definition: CLIPSensors.cpp:56
Base class for physical devices connected to the bridge (sensor or light).
Definition: BaseDevice.h:35
bool isOn() const
Check if sensor is on.
Definition: CLIPSensors.cpp:30
CLIPTemperature(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:153
CLIP sensor detecting whether a contact is open or closed.
Definition: CLIPSensors.h:105
CLIPSwitch(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:89
Common methods for CLIP sensors.
Definition: CLIPSensors.h:32
One-time, absolute time point.
Definition: TimePattern.h:72
CLIPHumidity(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:175
CLIPPresence(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:133
time::AbsoluteTime getLastUpdated() const
Get time of last status update.
Definition: CLIPSensors.cpp:69
CLIPGenericFlag(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:249
Class for generic or unknown sensor types.
Definition: Sensor.h:59
BaseCLIP(Sensor sensor)
Protected constructor to be used by subclasses.
Definition: CLIPSensors.h:81
CLIP sensor for light level.
Definition: CLIPSensors.h:195
CLIPOpenClose(Sensor sensor)
Construct from generic sensor.
Definition: CLIPSensors.h:109
std::string getURL() const
Get sensor URL.
Definition: CLIPSensors.cpp:60
CLIP sensor for a generic 3rd party sensor.
Definition: CLIPSensors.h:245
CLIP sensor for a generic 3rd party status.
Definition: CLIPSensors.h:269
int getBatteryState() const
Get battery state.
Definition: CLIPSensors.cpp:43
CLIP sensor for temperature.
Definition: CLIPSensors.h:149
bool hasBatteryState() const
Check whether the sensor has a battery state.
Definition: CLIPSensors.cpp:39