mirror of
https://github.com/esphome/esphome.git
synced 2026-09-23 21:14:03 +00:00
Merge remote-tracking branch 'upstream/dev' into integration
This commit is contained in:
@@ -14,12 +14,14 @@ interval:
|
||||
|
||||
// Test parse_json
|
||||
bool parse_ok = esphome::json::parse_json(json_str, [](JsonObject root) {
|
||||
if (root.containsKey("sensor") && root.containsKey("value")) {
|
||||
if (root["sensor"].is<const char*>() && root["value"].is<float>()) {
|
||||
const char* sensor = root["sensor"];
|
||||
float value = root["value"];
|
||||
ESP_LOGD("test", "Parsed: sensor=%s, value=%.1f", sensor, value);
|
||||
return true;
|
||||
} else {
|
||||
ESP_LOGD("test", "Parsed JSON missing required keys");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
ESP_LOGD("test", "Parse result (JSON syntax only): %s", parse_ok ? "success" : "failed");
|
||||
|
||||
@@ -68,5 +68,13 @@ lvgl:
|
||||
enter_button: pushbutton
|
||||
group: general
|
||||
initial_focus: lv_roller
|
||||
on_draw_start:
|
||||
- logger.log: draw started
|
||||
on_draw_end:
|
||||
- logger.log: draw ended
|
||||
- lvgl.pause:
|
||||
- component.update: tft_display
|
||||
- delay: 60s
|
||||
- lvgl.resume:
|
||||
|
||||
<<: !include common.yaml
|
||||
|
||||
@@ -14,10 +14,10 @@ display:
|
||||
binary_sensor:
|
||||
- platform: sdl
|
||||
id: key_up
|
||||
key: SDLK_a
|
||||
key: SDLK_UP
|
||||
- platform: sdl
|
||||
id: key_down
|
||||
key: SDLK_d
|
||||
key: SDLK_DOWN
|
||||
- platform: sdl
|
||||
id: key_enter
|
||||
key: SDLK_s
|
||||
key: SDLK_RETURN
|
||||
|
||||
Reference in New Issue
Block a user