diff --git a/components/tc_bus/tc_bus.cpp b/components/tc_bus/tc_bus.cpp index 69f7edb..cd221f2 100644 --- a/components/tc_bus/tc_bus.cpp +++ b/components/tc_bus/tc_bus.cpp @@ -44,7 +44,7 @@ namespace esphome { ESP_LOGCONFIG(TAG, "Setting up TC:BUS Intercom..."); - this->pref_ = global_preferences->make_preference(this->get_object_id_hash()); + this->pref_ = global_preferences->make_preference(global_tcs_id); Model saved_model; if (this->pref_.load(&saved_model)) @@ -54,7 +54,7 @@ namespace esphome else { this->model_ = MODEL_NONE; - this->pref_.save(this->model_); + this->pref_.save(&this->model_); } #ifdef USE_SELECT @@ -942,7 +942,7 @@ namespace esphome Model model = string_to_model(value); this->parent_->model_ = model; - this->parent_->pref_.save(model); + this->parent_->pref_.save(&model); } #endif