mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
more minor changes to clean up messaging
This commit is contained in:
@@ -212,9 +212,6 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
|
||||
if (!strcmp(lowtopic, F_(thermostat))) {
|
||||
return DeviceType::THERMOSTAT;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(system))) {
|
||||
return DeviceType::SYSTEM;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(scheduler))) {
|
||||
return DeviceType::SCHEDULER;
|
||||
}
|
||||
@@ -227,12 +224,6 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
|
||||
if (!strcmp(lowtopic, F_(mixer))) {
|
||||
return DeviceType::MIXER;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(temperaturesensor))) {
|
||||
return DeviceType::TEMPERATURESENSOR;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(analogsensor))) {
|
||||
return DeviceType::ANALOGSENSOR;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(switch))) {
|
||||
return DeviceType::SWITCH;
|
||||
}
|
||||
@@ -248,9 +239,6 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
|
||||
if (!strcmp(lowtopic, F_(heatsource))) {
|
||||
return DeviceType::HEATSOURCE;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(custom))) {
|
||||
return DeviceType::CUSTOM;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(ventilation))) {
|
||||
return DeviceType::VENTILATION;
|
||||
}
|
||||
@@ -261,6 +249,23 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
|
||||
return DeviceType::POOL;
|
||||
}
|
||||
|
||||
// non EMS
|
||||
if (!strcmp(lowtopic, F_(custom))) {
|
||||
return DeviceType::CUSTOM;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(temperaturesensor))) {
|
||||
return DeviceType::TEMPERATURESENSOR;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(analogsensor))) {
|
||||
return DeviceType::ANALOGSENSOR;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(scheduler))) {
|
||||
return DeviceType::SCHEDULER;
|
||||
}
|
||||
if (!strcmp(lowtopic, F_(system))) {
|
||||
return DeviceType::SYSTEM;
|
||||
}
|
||||
|
||||
return DeviceType::UNKNOWN;
|
||||
}
|
||||
|
||||
@@ -1606,7 +1611,6 @@ bool EMSdevice::get_value_info(JsonObject output, const char * cmd, const int8_t
|
||||
}
|
||||
return EMSESP::return_not_found(output, attribute_s, command_s); // not found
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user