mirror of
https://github.com/esphome/esphome.git
synced 2025-01-12 07:33:19 +01:00
Merge branch 'esphome:dev' into gp8211
This commit is contained in:
commit
2a670da25b
4 changed files with 18 additions and 1 deletions
|
@ -16,7 +16,7 @@ CODEOWNERS = ["@neffs", "@kbx81"]
|
||||||
|
|
||||||
DOMAIN = "bme68x_bsec2"
|
DOMAIN = "bme68x_bsec2"
|
||||||
|
|
||||||
BSEC2_LIBRARY_VERSION = "v1.7.2502"
|
BSEC2_LIBRARY_VERSION = "v1.8.2610"
|
||||||
|
|
||||||
CONF_ALGORITHM_OUTPUT = "algorithm_output"
|
CONF_ALGORITHM_OUTPUT = "algorithm_output"
|
||||||
CONF_BME68X_BSEC2_ID = "bme68x_bsec2_id"
|
CONF_BME68X_BSEC2_ID = "bme68x_bsec2_id"
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
#ifdef USE_BINARY_SENSOR
|
#ifdef USE_BINARY_SENSOR
|
||||||
#include "esphome/components/binary_sensor/binary_sensor.h"
|
#include "esphome/components/binary_sensor/binary_sensor.h"
|
||||||
#endif // USE_BINARY_SENSOR
|
#endif // USE_BINARY_SENSOR
|
||||||
|
#ifdef USE_LVGL_IMAGE
|
||||||
|
#include "esphome/components/image/image.h"
|
||||||
|
#endif // USE_LVGL_IMAGE
|
||||||
#ifdef USE_LVGL_ROTARY_ENCODER
|
#ifdef USE_LVGL_ROTARY_ENCODER
|
||||||
#include "esphome/components/rotary_encoder/rotary_encoder.h"
|
#include "esphome/components/rotary_encoder/rotary_encoder.h"
|
||||||
#endif // USE_LVGL_ROTARY_ENCODER
|
#endif // USE_LVGL_ROTARY_ENCODER
|
||||||
|
@ -47,6 +50,14 @@ static const display::ColorBitness LV_BITNESS = display::ColorBitness::COLOR_BIT
|
||||||
static const display::ColorBitness LV_BITNESS = display::ColorBitness::COLOR_BITNESS_332;
|
static const display::ColorBitness LV_BITNESS = display::ColorBitness::COLOR_BITNESS_332;
|
||||||
#endif // LV_COLOR_DEPTH
|
#endif // LV_COLOR_DEPTH
|
||||||
|
|
||||||
|
#ifdef USE_LVGL_IMAGE
|
||||||
|
// Shortcut / overload, so that the source of an image can easily be updated
|
||||||
|
// from within a lambda.
|
||||||
|
inline void lv_img_set_src(lv_obj_t *obj, esphome::image::Image *image) {
|
||||||
|
lv_img_set_src(obj, image->get_lv_img_dsc());
|
||||||
|
}
|
||||||
|
#endif // USE_LVGL_IMAGE
|
||||||
|
|
||||||
// Parent class for things that wrap an LVGL object
|
// Parent class for things that wrap an LVGL object
|
||||||
class LvCompound {
|
class LvCompound {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -127,6 +127,11 @@ binary_sensor:
|
||||||
- platform: lvgl
|
- platform: lvgl
|
||||||
name: LVGL checkbox
|
name: LVGL checkbox
|
||||||
widget: checkbox_id
|
widget: checkbox_id
|
||||||
|
on_state:
|
||||||
|
then:
|
||||||
|
- lvgl.image.update:
|
||||||
|
id: lv_image
|
||||||
|
src: !lambda if (x) return id(cat_image); else return id(dog_image);
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
ssid: SSID
|
ssid: SSID
|
||||||
|
|
|
@ -419,6 +419,7 @@ lvgl:
|
||||||
spin_time: 2s
|
spin_time: 2s
|
||||||
align: left_mid
|
align: left_mid
|
||||||
- image:
|
- image:
|
||||||
|
id: lv_image
|
||||||
src: cat_image
|
src: cat_image
|
||||||
align: top_left
|
align: top_left
|
||||||
y: 50
|
y: 50
|
||||||
|
|
Loading…
Reference in a new issue