22#ifndef INCLUDE_HUEPLUSPLUS_SENSOR_LIST_H
23#define INCLUDE_HUEPLUSPLUS_SENSOR_LIST_H
61 nlohmann::json state = this->
stateCache->getValue();
62 std::vector<T> result;
63 for (
auto it = state.begin(); it != state.end(); ++it)
66 if (it->value(
"type",
"") == T::typeStr)
CreateableResourceList(CreateableResourceList &&)=default
Protected defaulted move constructor.
Sensor get(const IdType &id)
Definition ResourceList.h:126
static IdType maybeStoi(const std::string &key)
Definition ResourceList.h:173
std::shared_ptr< APICache > stateCache
Definition ResourceList.h:230
T asSensorType() const &
Convert sensor to a specific type.
Definition Sensor.h:210
SensorList & operator=(SensorList &&)=default
Protected defaulted move assignment.
std::vector< T > getAllByType()
Get all sensors of type T.
Definition SensorList.h:59
T getAsType(int id)
Get sensor specified by id, convert to T.
Definition SensorList.h:47
SensorList(SensorList &&)=default
Protected defaulted move constructor.
CreateableResourceList(CreateableResourceList &&)=default
Protected defaulted move constructor.
Namespace for the hueplusplus library.
Definition Action.h:28