diff --git a/components/tc_bus/tc_bus.cpp b/components/tc_bus/tc_bus.cpp index 2e389d5..f0f65f2 100644 --- a/components/tc_bus/tc_bus.cpp +++ b/components/tc_bus/tc_bus.cpp @@ -695,10 +695,21 @@ namespace esphome memory_buffer_[index] = (cell1 << 4) | (new_value & 0xF); settings_.handset_volume = new_value; break; + + default: + ESP_LOGW(TAG, "Unknown Setting!"); + break; } - uint16_t new_values = (memory_buffer_[index] << 8) | memory_buffer_[index + 1]; - send_command(COMMAND_TYPE_WRITE_MEMORY, index, new_values, serial_number); + if(index == 0) + { + return; + } + else + { + uint16_t new_values = (memory_buffer_[index] << 8) | memory_buffer_[index + 1]; + send_command(COMMAND_TYPE_WRITE_MEMORY, index, new_values, serial_number); + } } void TCBusComponent::write_memory(uint32_t serial_number)