diff --git a/components/BalboaGL/ESPBalboaGL.h b/components/BalboaGL/ESPBalboaGL.h index 11bdae9..47ad225 100644 --- a/components/BalboaGL/ESPBalboaGL.h +++ b/components/BalboaGL/ESPBalboaGL.h @@ -76,6 +76,10 @@ class BalboaGL : public PollingComponent, public climate::Climate { float get_setup_priority() const override { return esphome::setup_priority::AFTER_WIFI; } + balboaGL* getSpa() { + return spa; + } + protected: // The ClimateTraits supported by this HeatPump. climate::ClimateTraits traits_; diff --git a/components/BalboaGLSwitch/BalboaGLSwitch.h b/components/BalboaGLSwitch/BalboaGLSwitch.h index 323c457..0795798 100644 --- a/components/BalboaGLSwitch/BalboaGLSwitch.h +++ b/components/BalboaGLSwitch/BalboaGLSwitch.h @@ -13,7 +13,7 @@ namespace esphome { void write_state(bool state) override { // This will be called every time the user requests a state change. - // digitalWrite(5, state); + balboagl->getSpa()->setLight(state); // Acknowledge new state by publishing it // publish_state(state);