mirror of
https://github.com/esphome/esphome.git
synced 2024-12-22 05:24:53 +01:00
sim800l: Add support of roaming-registered SIM cards (#977)
* Add support of roaming-registered cards * Change or to ||
This commit is contained in:
parent
499903bd3d
commit
e6f21873c3
1 changed files with 1 additions and 1 deletions
|
@ -97,7 +97,7 @@ void Sim800LComponent::parse_cmd_(std::string message) {
|
|||
case STATE_CREGWAIT: {
|
||||
// Response: "+CREG: 0,1" -- the one there means registered ok
|
||||
// "+CREG: -,-" means not registered ok
|
||||
bool registered = message.compare(0, 6, "+CREG:") == 0 && message[9] == '1';
|
||||
bool registered = message.compare(0, 6, "+CREG:") == 0 && (message[9] == '1' || message[9] == '5');
|
||||
if (registered) {
|
||||
if (!this->registered_)
|
||||
ESP_LOGD(TAG, "Registered OK");
|
||||
|
|
Loading…
Reference in a new issue