Skip to content

Commit

Permalink
Add LCD
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 7, 2023
1 parent 6fb18ad commit 2d618ad
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/BalboaGL/climate.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,5 @@ def to_code(config):
cg.add_library(
name="balboaGL",
repository="https://github.com/netmindz/balboaGL.git",
version="99e703abd8c418a2d470bf8076f8d88a41fae7c8",
version="ec30c86f8100fb8cd6562ba4e333cda527b62704",
)
10 changes: 10 additions & 0 deletions components/BalboaGLSensor/ESPBalboaGLSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

};

}
}
7 changes: 6 additions & 1 deletion components/BalboaGLSensor/text_sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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
Expand All @@ -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)

0 comments on commit 2d618ad

Please sign in to comment.