From 2d618adbe05cfbffd0a9e303cef48b3e727a9820 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Sat, 7 Oct 2023 11:19:06 +0100 Subject: [PATCH] Add LCD --- components/BalboaGL/climate.py | 2 +- components/BalboaGLSensor/ESPBalboaGLSensor.h | 10 ++++++++++ components/BalboaGLSensor/text_sensor.py | 7 ++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/components/BalboaGL/climate.py b/components/BalboaGL/climate.py index 7db595c..2e1e7cd 100644 --- a/components/BalboaGL/climate.py +++ b/components/BalboaGL/climate.py @@ -89,5 +89,5 @@ def to_code(config): cg.add_library( name="balboaGL", repository="https://github.com/netmindz/balboaGL.git", - version="99e703abd8c418a2d470bf8076f8d88a41fae7c8", + version="ec30c86f8100fb8cd6562ba4e333cda527b62704", ) diff --git a/components/BalboaGLSensor/ESPBalboaGLSensor.h b/components/BalboaGLSensor/ESPBalboaGLSensor.h index 277ffbc..e98c0e9 100644 --- a/components/BalboaGLSensor/ESPBalboaGLSensor.h +++ b/components/BalboaGLSensor/ESPBalboaGLSensor.h @@ -33,5 +33,15 @@ namespace esphome { }; + class BalboaGLLCDSensor : public TextSensor, public PollingComponent { + public: + BalboaGLLCDSensor() : PollingComponent(15000) { } + // void setup() {}; + void update() { + this->publish_state(status.lcd); + } + + }; + } } diff --git a/components/BalboaGLSensor/text_sensor.py b/components/BalboaGLSensor/text_sensor.py index 4a4d4b7..ad3b4b9 100644 --- a/components/BalboaGLSensor/text_sensor.py +++ b/components/BalboaGLSensor/text_sensor.py @@ -6,11 +6,13 @@ CONF_STATE = "state" CONF_RAW = "raw" +CONF_LCD = "lcd" balboa_sensor_ns = cg.esphome_ns.namespace('balboa_sensor') StateInfo = balboa_sensor_ns.class_('BalboaGLStateSensor', text_sensor.TextSensor, cg.Component) RawInfo = balboa_sensor_ns.class_('BalboaGLRawSensor', text_sensor.TextSensor, cg.Component) +LCDInfo = balboa_sensor_ns.class_('BalboaGLLCDSensor', text_sensor.TextSensor, cg.Component) CONFIG_SCHEMA = cv.Schema({ cv.Optional(CONF_STATE): text_sensor.TEXT_SENSOR_SCHEMA.extend({ @@ -19,6 +21,9 @@ cv.Optional(CONF_RAW): text_sensor.TEXT_SENSOR_SCHEMA.extend({ cv.GenerateID(): cv.declare_id(RawInfo), }), + cv.Optional(CONF_LCD): text_sensor.TEXT_SENSOR_SCHEMA.extend({ + cv.GenerateID(): cv.declare_id(LCDInfo), + }), }) @coroutine @@ -32,4 +37,4 @@ def setup_conf(config, key): def to_code(config): yield setup_conf(config, CONF_STATE) yield setup_conf(config, CONF_RAW) - + yield setup_conf(config, CONF_LCD)