@@ -135,11 +135,11 @@ void SEN5XComponent::internal_setup_(uint8_t state) {
135135 return ;
136136 } else {
137137 // update blank product name from model parameter
138- this ->product_name_ = model_to_str (this ->model_ .value ());
138+ this ->product_name_ = model_to_str_ (this ->model_ .value ());
139139 }
140140 } else if (!this ->model_ .has_value ()) {
141141 // model is not defined, get it from product name
142- this ->model_ .value () = str_to_model (this ->product_name_ .c_str ());
142+ this ->model_ .value () = str_to_model_ (this ->product_name_ .c_str ());
143143 if (this ->model_ .value () == UNKNOWN_MODEL) {
144144 ESP_LOGE (TAG, " Product Name from sensor is not a known sensor" );
145145 this ->error_code_ = PRODUCT_NAME_FAILED;
@@ -148,7 +148,7 @@ void SEN5XComponent::internal_setup_(uint8_t state) {
148148 }
149149 } else {
150150 // product name and model specified in config, they must match
151- if (this ->product_name_ != model_to_str (this ->model_ .value ())) {
151+ if (this ->product_name_ != model_to_str_ (this ->model_ .value ())) {
152152 ESP_LOGE (TAG, " Sensor Product Name does not match 'model' in configuration" );
153153 this ->error_code_ = PRODUCT_NAME_FAILED;
154154 this ->mark_failed ();
@@ -441,7 +441,7 @@ void SEN5XComponent::dump_config() {
441441 }
442442 LOG_I2C_DEVICE (this );
443443 if (this ->model_ .has_value ()) {
444- ESP_LOGCONFIG (TAG, " Model: %s" , model_to_str (this ->model_ .value ()));
444+ ESP_LOGCONFIG (TAG, " Model: %s" , model_to_str_ (this ->model_ .value ()));
445445 }
446446 ESP_LOGCONFIG (TAG, " Product Name: %s" , this ->product_name_ .c_str ());
447447 ESP_LOGCONFIG (TAG, " Serial number: %s" , this ->serial_number_ .c_str ());
@@ -546,6 +546,7 @@ void SEN5XComponent::update() {
546546 case SEN68:
547547 cmd = SEN68_CMD_READ_MEASUREMENT;
548548 length = 9 ;
549+ break ;
549550 default :
550551 cmd = SEN5X_CMD_READ_MEASUREMENT;
551552 length = 9 ;
@@ -682,6 +683,7 @@ bool SEN5XComponent::start_measurements_() {
682683 case SEN66:
683684 case SEN68:
684685 cmd = CMD_START_MEASUREMENTS;
686+ break ;
685687 default :
686688 cmd = SEN60_CMD_START_MEASUREMENTS;
687689 break ;
@@ -802,7 +804,7 @@ bool SEN5XComponent::is_sen6x_() {
802804 return false ;
803805 }
804806}
805- const char *SEN5XComponent::model_to_str (Sen5xType model) {
807+ const char *SEN5XComponent::model_to_str_ (Sen5xType model) {
806808 switch (model) {
807809 case SEN50:
808810 return " SEN50" ;
@@ -825,7 +827,7 @@ const char *SEN5XComponent::model_to_str(Sen5xType model) {
825827 }
826828}
827829
828- Sen5xType SEN5XComponent::str_to_model (const char *product_name) {
830+ Sen5xType SEN5XComponent::str_to_model_ (const char *product_name) {
829831 if (strcmp (product_name, " SEN50" ) == 0 ) {
830832 return SEN50;
831833 } else if (strcmp (product_name, " SEN54" ) == 0 ) {
0 commit comments