more minor changes to clean up messaging

This commit is contained in:
proddy
2024-07-24 13:22:34 +02:00
parent 0054a89c38
commit fa54cb6a48
11 changed files with 85 additions and 63 deletions

View File

@@ -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;
}
}