ESPHome  2024.11.3
light_json_schema.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "esphome/core/defines.h"
4 
5 #ifdef USE_JSON
6 
8 #include "light_call.h"
9 #include "light_state.h"
10 
11 namespace esphome {
12 namespace light {
13 
15  public:
17  static void dump_json(LightState &state, JsonObject root);
19  static void parse_json(LightState &state, LightCall &call, JsonObject root);
20 
21  protected:
22  static void parse_color_json(LightState &state, LightCall &call, JsonObject root);
23 };
24 
25 } // namespace light
26 } // namespace esphome
27 
28 #endif
This class represents the communication layer between the front-end MQTT layer and the hardware outpu...
Definition: light_state.h:63
static void parse_json(LightState &state, LightCall &call, JsonObject root)
Parse the JSON state of a light to a LightCall.
This class represents a requested change in a light state.
Definition: light_call.h:14
static void dump_json(LightState &state, JsonObject root)
Dump the state of a light as JSON.
static void parse_color_json(LightState &state, LightCall &call, JsonObject root)
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
bool state
Definition: fan.h:34