Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Oct 25, 2024
1 parent d585030 commit e3d2dba
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,7 @@ namespace esphome
this->publish_state(value);

Model model = string_to_model(value);
this->parent_->model_ = model;
this->parent_->set_model(model);
this->parent_->pref_.save(&model);
}

Expand Down
2 changes: 2 additions & 0 deletions components/tc_bus/tc_bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ namespace esphome

void register_listener(TCBusListener *listener);

void set_model(Model model) { this->model_ = model; }

void set_sn(uint32_t serial_number) { this->serial_number_ = serial_number; }
void set_sn_lambda(std::function<optional<uint32_t>()> &&serial_number_lambda) { this->serial_number_lambda_ = serial_number_lambda; }

Expand Down

0 comments on commit e3d2dba

Please sign in to comment.