code refactoring: use the defined states of header file

This commit is contained in:
Ollo
2022-08-21 11:59:50 +02:00
parent 5d24a51bd9
commit c444117853
4 changed files with 18 additions and 18 deletions

View File

@@ -69,9 +69,9 @@ static const char *SENSOR_STRING[] = {
#define PLANTSTATE_STR_NO_SENSOR "nosensor"
#define PLANTSTATE_STR_WET "wet"
#define PLANTSTATE_STR_SUNNY_ALARM "sunny+alarm"
#define PLANTSTATE_STR_ACTIVE_ALARM "activate+alarm"
#define PLANTSTATE_STR_ACTIVE_SUPESSED "activate+supressed"
#define PLANTSTATE_STR_ACTIVE "activate"
#define PLANTSTATE_STR_ACTIVE_ALARM "active+alarm"
#define PLANTSTATE_STR_ACTIVE_SUPESSED "active+supressed"
#define PLANTSTATE_STR_ACTIVE "active"
#define PLANTSTATE_STR_SUNNY "sunny"
#define PLANTSTATE_STR_COOLDOWN_ALARM "cooldown+alarm"
#define PLANTSTATE_STR_COOLDOWN "cooldown"

View File

@@ -197,7 +197,7 @@ public:
return this->mSetting->pPumpOnlyWhenLowLight->get();
}
void publishState(String state);
void publishState(int stateNumber, String stateString);
bool switchHandler(const HomieRange &range, const String &value);