refactor out console context menus - #510

This commit is contained in:
proddy
2020-09-23 00:19:51 +02:00
parent 6763bb2832
commit b1f10fa5ee
33 changed files with 295 additions and 489 deletions

View File

@@ -55,7 +55,7 @@ std::string EMSdevice::brand_to_string() const {
// returns the name of the MQTT topic to use for a specific device
std::string EMSdevice::device_type_2_device_name(const uint8_t device_type) {
switch (device_type) {
case DeviceType::SERVICEKEY:
case DeviceType::SYSTEM:
return read_flash_string(F("system"));
break;
@@ -79,6 +79,18 @@ std::string EMSdevice::device_type_2_device_name(const uint8_t device_type) {
return read_flash_string(F("mixing"));
break;
case DeviceType::SENSOR:
return read_flash_string(F("sensor"));
break;
case DeviceType::CONTROLLER:
return read_flash_string(F("controller"));
break;
case DeviceType::SWITCH:
return read_flash_string(F("switch"));
break;
default:
return std::string{};
break;
@@ -96,7 +108,7 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
}
if (strcmp(topic, "system") == 0) {
return DeviceType::SERVICEKEY;
return DeviceType::SYSTEM;
}
if (strcmp(topic, "heatpump") == 0) {