Skip to content

Commit

Permalink
Push state
Browse files Browse the repository at this point in the history
  • Loading branch information
netmindz committed Oct 17, 2023
1 parent 2e20380 commit 0550631
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
14 changes: 12 additions & 2 deletions components/BalboaGL/ESPBalboaGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,21 @@ void BalboaGL::update() {
}

static String lastRaw = "0";
// if(status.rawData != lastRaw) {
if(status.rawData != lastRaw) {
ESP_LOGD(TAG, "Raw: %s", status.rawData.c_str());
lastRaw = status.rawData;

// this->pump1->publish_state(pump_mode[status.pump1]);
// this->pump2->publish_state(pump_mode[status.pump2]);

this->lightSwitch->publish_state(status.light);

this->stateSensor->update();
this->rawSensor->update();
this->lcdSensor->update();

this->publish_state();
// }
}

}

Expand Down
14 changes: 8 additions & 6 deletions components/BalboaGL/ESPBalboaGL.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,14 @@ class BalboaGL : public PollingComponent, public climate::Climate {
//ESP8266 or UART0 on ESP32
void check_logger_conflict_();

// esphome::balboa_select::BalboaGLPump1Select pump1;
// esphome::balboa_select::BalboaGLPump2Select pump2;
esphome::balboa_switch::BalboaGLLightSwitch lightSwitch;
esphome::balboa_sensor::BalboaGLStateSensor stateSensor;
esphome::balboa_sensor::BalboaGLRawSensor rawSensor;
esphome::balboa_sensor::BalboaGLLCDSensor lcdSensor;
esphome::balboa_select::BalboaGLPump1Select* pump1;
esphome::balboa_select::BalboaGLPump2Select* pump2;

esphome::balboa_switch::BalboaGLLightSwitch* lightSwitch;

esphome::balboa_sensor::BalboaGLStateSensor* stateSensor;
esphome::balboa_sensor::BalboaGLRawSensor* rawSensor;
esphome::balboa_sensor::BalboaGLLCDSensor* lcdSensor;

int rx_pin = -1;
int tx_pin = -1;
Expand Down

0 comments on commit 0550631

Please sign in to comment.