mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-09 01:09:51 +03:00
refactor commands to its own class, implement rest API #506
This commit is contained in:
@@ -246,48 +246,47 @@ class Thermostat : public EMSdevice {
|
||||
void process_RC300WWmode(std::shared_ptr<const Telegram> telegram);
|
||||
|
||||
// internal helper functions
|
||||
void set_mode_n(const uint8_t mode, const uint8_t hc_num);
|
||||
bool set_mode_n(const uint8_t mode, const uint8_t hc_num);
|
||||
|
||||
void set_temperature_value(const char * value, const int8_t id, const uint8_t mode);
|
||||
void set_temperature(const float temperature, const std::string & mode, const uint8_t hc_num);
|
||||
void set_temperature(const float temperature, const uint8_t mode, const uint8_t hc_num);
|
||||
bool set_temperature_value(const char * value, const int8_t id, const uint8_t mode);
|
||||
bool set_temperature(const float temperature, const std::string & mode, const uint8_t hc_num);
|
||||
bool set_temperature(const float temperature, const uint8_t mode, const uint8_t hc_num);
|
||||
|
||||
// for HA specifically. MQTT functions.
|
||||
void thermostat_cmd_temp(const char * message);
|
||||
void thermostat_cmd_mode(const char * message);
|
||||
bool thermostat_cmd_temp(const char * message);
|
||||
bool thermostat_cmd_mode(const char * message);
|
||||
|
||||
// set functions - these use the id/hc
|
||||
void set_mode(const char * value, const int8_t id);
|
||||
void set_control(const char * value, const int8_t id);
|
||||
void set_holiday(const char * value, const int8_t id);
|
||||
void set_pause(const char * value, const int8_t id);
|
||||
void set_party(const char * value, const int8_t id);
|
||||
bool set_mode(const char * value, const int8_t id);
|
||||
bool set_control(const char * value, const int8_t id);
|
||||
bool set_holiday(const char * value, const int8_t id);
|
||||
bool set_pause(const char * value, const int8_t id);
|
||||
bool set_party(const char * value, const int8_t id);
|
||||
|
||||
void set_temp(const char * value, const int8_t id);
|
||||
void set_nighttemp(const char * value, const int8_t id);
|
||||
void set_daytemp(const char * value, const int8_t id);
|
||||
void set_comforttemp(const char * value, const int8_t id);
|
||||
void set_nofrosttemp(const char * value, const int8_t id);
|
||||
void set_ecotemp(const char * value, const int8_t id);
|
||||
void set_heattemp(const char * value, const int8_t id);
|
||||
void set_summertemp(const char * value, const int8_t id);
|
||||
void set_designtemp(const char * value, const int8_t id);
|
||||
void set_offsettemp(const char * value, const int8_t id);
|
||||
void set_holidaytemp(const char * value, const int8_t id);
|
||||
void set_manualtemp(const char * value, const int8_t id);
|
||||
|
||||
void set_remotetemp(const char * value, const int8_t id);
|
||||
bool set_temp(const char * value, const int8_t id);
|
||||
bool set_nighttemp(const char * value, const int8_t id);
|
||||
bool set_daytemp(const char * value, const int8_t id);
|
||||
bool set_comforttemp(const char * value, const int8_t id);
|
||||
bool set_nofrosttemp(const char * value, const int8_t id);
|
||||
bool set_ecotemp(const char * value, const int8_t id);
|
||||
bool set_heattemp(const char * value, const int8_t id);
|
||||
bool set_summertemp(const char * value, const int8_t id);
|
||||
bool set_designtemp(const char * value, const int8_t id);
|
||||
bool set_offsettemp(const char * value, const int8_t id);
|
||||
bool set_holidaytemp(const char * value, const int8_t id);
|
||||
bool set_manualtemp(const char * value, const int8_t id);
|
||||
bool set_remotetemp(const char * value, const int8_t id);
|
||||
|
||||
// set functions - these don't use the id/hc, the parameters are ignored
|
||||
void set_wwmode(const char * value, const int8_t id);
|
||||
void set_datetime(const char * value, const int8_t id);
|
||||
void set_minexttemp(const char * value, const int8_t id);
|
||||
void set_clockoffset(const char * value, const int8_t id);
|
||||
void set_calinttemp(const char * value, const int8_t id);
|
||||
void set_display(const char * value, const int8_t id);
|
||||
void set_building(const char * value, const int8_t id);
|
||||
void set_language(const char * value, const int8_t id);
|
||||
}; // namespace emsesp
|
||||
bool set_wwmode(const char * value, const int8_t id);
|
||||
bool set_datetime(const char * value, const int8_t id);
|
||||
bool set_minexttemp(const char * value, const int8_t id);
|
||||
bool set_clockoffset(const char * value, const int8_t id);
|
||||
bool set_calinttemp(const char * value, const int8_t id);
|
||||
bool set_display(const char * value, const int8_t id);
|
||||
bool set_building(const char * value, const int8_t id);
|
||||
bool set_language(const char * value, const int8_t id);
|
||||
};
|
||||
|
||||
} // namespace emsesp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user