Hass Discovery: fix wrong trigger state

This commit is contained in:
Federico Leoni 2020-05-07 12:58:39 -03:00 committed by GitHub
parent 1e8277eccd
commit 4e2edb83d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -791,7 +791,9 @@ void HAssAnyKey(void)
char stopic[TOPSZ];
if (state == 3) {
if (state == 2) {
snprintf_P(trg_state, sizeof(trg_state), PSTR("SINGLE"));
} else if (state == 3) {
snprintf_P(trg_state, sizeof(trg_state), GetStateText(3));
} else {
GetTextIndexed(trg_state, sizeof(trg_state), state -9, kHAssTriggerStringButtons);
@ -847,4 +849,4 @@ bool Xdrv12(uint8_t function)
return result;
}
#endif // USE_HOME_ASSISTANT
#endif // USE_HOME_ASSISTANT