From 4e2edb83d2f7f3a9c0c4da319e51485312900df1 Mon Sep 17 00:00:00 2001 From: Federico Leoni Date: Thu, 7 May 2020 12:58:39 -0300 Subject: [PATCH] Hass Discovery: fix wrong trigger state --- tasmota/xdrv_12_home_assistant.ino | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tasmota/xdrv_12_home_assistant.ino b/tasmota/xdrv_12_home_assistant.ino index 51de71219..43220b7d3 100644 --- a/tasmota/xdrv_12_home_assistant.ino +++ b/tasmota/xdrv_12_home_assistant.ino @@ -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 \ No newline at end of file +#endif // USE_HOME_ASSISTANT