Skip to content

Commit

Permalink
Set Values on read
Browse files Browse the repository at this point in the history
  • Loading branch information
AzonInc committed Oct 26, 2024
1 parent 825d1f0 commit 2140f19
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion components/tc_bus/tc_bus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,21 @@ namespace esphome

ESP_LOGD(TAG, "Handset volume %i", get_setting(SETTING_VOLUME_HANDSET));
ESP_LOGD(TAG, "Ringtone volume %i", get_setting(SETTING_VOLUME_RINGTONE));
ESP_LOGD(TAG, "Door Call Ringtone %i", get_setting(SETTING_RINGTONE_DOOR_CALL));
ESP_LOGD(TAG, "Door Call Ringtone %i", );
ESP_LOGD(TAG, "Floor Call Ringtone %i", get_setting(SETTING_RINGTONE_FLOOR_CALL));
ESP_LOGD(TAG, "Internal Call Ringtone %i", get_setting(SETTING_RINGTONE_INTERNAL_CALL));

if (this->intercom_ringtone_door_call_select_ != nullptr)
this->intercom_ringtone_door_call_select_->publish_state(int_to_ringtone(get_setting(SETTING_RINGTONE_DOOR_CALL)));
if (this->intercom_ringtone_floor_call_select_ != nullptr)
this->intercom_ringtone_floor_call_select_->publish_state(int_to_ringtone(get_setting(SETTING_RINGTONE_FLOOR_CALL)));
if (this->intercom_ringtone_internal_call_select_ != nullptr)
this->intercom_ringtone_internal_call_select_->publish_state(int_to_ringtone(get_setting(SETTING_RINGTONE_INTERNAL_CALL)));
if (this->intercom_volume_handset_number_ != nullptr)
this->intercom_volume_handset_number_->publish_state(get_setting(SETTING_VOLUME_HANDSET));
if (this->intercom_volume_ringtone_number_ != nullptr)
this->intercom_volume_ringtone_number_->publish_state(get_setting(SETTING_VOLUME_RINGTONE));

this->read_memory_complete_callback_.call(memory_buffer_);
}
else
Expand Down

0 comments on commit 2140f19

Please sign in to comment.