1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-09 23:02:23 +01:00

Color mode implementation (#2012)

This commit is contained in:
Oxan van Leeuwen
2021-07-29 19:11:56 +02:00
committed by GitHub
parent de382b704c
commit 5983ccc55c
39 changed files with 1210 additions and 476 deletions

View File

@@ -8,6 +8,10 @@
#include <cstdlib>
#ifdef USE_LIGHT
#include "esphome/components/light/light_json_schema.h"
#endif
#ifdef USE_LOGGER
#include <esphome/components/logger/logger.h>
#endif
@@ -528,7 +532,7 @@ std::string WebServer::light_json(light::LightState *obj) {
return json::build_json([obj](JsonObject &root) {
root["id"] = "light-" + obj->get_object_id();
root["state"] = obj->remote_values.is_on() ? "ON" : "OFF";
obj->dump_json(root);
light::LightJSONSchema::dump_json(*obj, root);
});
}
#endif