diff --git a/esphome/components/ebyte_lora/ebyte_lora_component.h b/esphome/components/ebyte_lora/ebyte_lora_component.h index d9789a91ce..47afddbc88 100644 --- a/esphome/components/ebyte_lora/ebyte_lora_component.h +++ b/esphome/components/ebyte_lora/ebyte_lora_component.h @@ -97,7 +97,12 @@ class EbyteLoraSwitch : public switch_::Switch, public Parentedparent_->send_switch_info_(); } + void write_state(bool state) override { + // set it first + this->publish_state(state); + // then tell the world about it + this->parent_->send_switch_info_(); + } uint8_t pin_; }; #endif