diff --git a/src/Blinker/BlinkerApi.h b/src/Blinker/BlinkerApi.h index 8f0f876c..31b4a340 100644 --- a/src/Blinker/BlinkerApi.h +++ b/src/Blinker/BlinkerApi.h @@ -614,7 +614,11 @@ class BlinkerApi if (STRING_find_string_value(static_cast(this)->dataParse(), state, BLINKER_CMD_GET)) { // _fresh = true; if (state == BLINKER_CMD_STATE) { +#if defined(BLINKER_MQTT) static_cast(this)->print(BLINKER_CMD_STATE, BLINKER_CMD_ONLINE); +#else + static_cast(this)->print(BLINKER_CMD_STATE, BLINKER_CMD_CONNECTED); +#endif _fresh = true; } } diff --git a/src/Blinker/BlinkerConfig.h b/src/Blinker/BlinkerConfig.h index 19ad8fef..ba883c0f 100644 --- a/src/Blinker/BlinkerConfig.h +++ b/src/Blinker/BlinkerConfig.h @@ -63,6 +63,8 @@ #define BLINKER_CMD_ONLINE "online" +#define BLINKER_CMD_CONNECTED "connected" + #define BLINKER_CMD_VERSION "version" #define BLINKER_CMD_NOTICE "notice"