Skip to content

Commit

Permalink
Switches fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paveldn committed Aug 22, 2024
1 parent ecefe89 commit a8a63c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions components/haier/switch/display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace esphome {
namespace haier {

void DisplaySwitch::write_state(bool state) {
if (this->parent_->get_display_state() != state) {
this->parent_->set_display_state(state);
}
this->publish_state(state);
}

Expand Down
3 changes: 3 additions & 0 deletions components/haier/switch/health_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ namespace esphome {
namespace haier {

void HealthModeSwitch::write_state(bool state) {
if (this->parent_->get_health_mode() != state) {
this->parent_->set_health_mode(state);
}
this->publish_state(state);
}

Expand Down

0 comments on commit a8a63c0

Please sign in to comment.