diff --git a/hueplusplus/HueLight.cpp b/hueplusplus/HueLight.cpp index 83a2cb4..c62cb69 100755 --- a/hueplusplus/HueLight.cpp +++ b/hueplusplus/HueLight.cpp @@ -51,6 +51,11 @@ std::string HueLight::getName() return state["name"].asString(); } +std::string HueLight::getName() const +{ + return state["name"].asString(); +} + bool HueLight::setName(const std::string& name) { Json::Value request(Json::objectValue); diff --git a/hueplusplus/include/HueLight.h b/hueplusplus/include/HueLight.h index 2a238cb..aa00afa 100755 --- a/hueplusplus/include/HueLight.h +++ b/hueplusplus/include/HueLight.h @@ -123,6 +123,12 @@ public: //! \return String containig the name of the light std::string getName(); + //! \brief Const function that returns the name of the light. + //! + //! \note This will not refresh the light state + //! \return String containig the name of the light + std::string getName() const; + //! \brief Function that sets the name of the light //! //! \return Bool that is true on success