add ventilation device class

This commit is contained in:
MichaelDvP
2023-05-10 16:55:03 +02:00
parent c9ab6b23ea
commit b2ad600de2
9 changed files with 259 additions and 4 deletions

View File

@@ -137,6 +137,8 @@ const char * EMSdevice::device_type_2_device_name(const uint8_t device_type) {
return F_(heatsource);
case DeviceType::CUSTOM:
return F_(custom);
case DeviceType::VENTILATION:
return F_(ventilation);
default:
return Helpers::translated_word(FL_(unknown), true);
}
@@ -170,6 +172,8 @@ const char * EMSdevice::device_type_2_device_name_translated() {
return Helpers::translated_word(FL_(pump_device));
case DeviceType::HEATSOURCE:
return Helpers::translated_word(FL_(heatsource_device));
case DeviceType::VENTILATION:
return Helpers::translated_word(FL_(ventilation_device));
default:
break;
}
@@ -234,6 +238,9 @@ uint8_t EMSdevice::device_name_2_device_type(const char * topic) {
if (!strcmp(lowtopic, F_(custom))) {
return DeviceType::CUSTOM;
}
if (!strcmp(lowtopic, F_(ventilation))) {
return DeviceType::VENTILATION;
}
return DeviceType::UNKNOWN;
}