Merge pull request #17163 from hallard/teleinfo_fix

Teleinfo Fix BBR and EJP detection
This commit is contained in:
Theo Arends 2022-11-24 14:29:04 +01:00 committed by GitHub
commit dc93d310c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,7 @@ const char kContratName[] PROGMEM =
// Received current contract value for legacy, standard mode has in clear text
const char kContratValue[] PROGMEM =
"|BASE|HC..|EJP.|BBR"
"|BASE|HC..|EJP|BBR"
;
// all tariff type for legacy, standard mode has in clear text
@ -428,7 +428,7 @@ void DataCallback(struct _ValueList * me, uint8_t flags)
// Find the contract index
for (contrat = CONTRAT_BAS ; contrat < CONTRAT_END ; contrat++) {
GetTextIndexed(contrat_value, sizeof(contrat_value), contrat, kContratValue);
if (!strcmp(contrat_value, me->value)) {
if (strstr(me->value, contrat_value)) {
break;
}
}