mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-26 15:48:28 +02:00
Introduce parse_number() helper function (#2659)
This commit is contained in:
@@ -656,7 +656,7 @@ void Pipsolar::loop() {
|
||||
case 32:
|
||||
fc = tmp[i];
|
||||
fc += tmp[i + 1];
|
||||
this->value_fault_code_ = strtol(fc.c_str(), nullptr, 10);
|
||||
this->value_fault_code_ = parse_number<int>(fc).value_or(0);
|
||||
break;
|
||||
case 34:
|
||||
this->value_warnung_low_pv_energy_ = enabled;
|
||||
|
||||
Reference in New Issue
Block a user