more fixes for Create table of all EMS-ESP entities, by device, shortname/fullname and characteristics #828

This commit is contained in:
Proddy
2022-12-29 22:02:36 +01:00
parent 14cfbf78bd
commit 6dce5f5931
4 changed files with 78 additions and 63 deletions

View File

@@ -313,7 +313,7 @@ void EMSESP::show_ems(uuid::console::Shell & shell) {
void EMSESP::dump_all_values(uuid::console::Shell & shell) {
Serial.println("---- CSV START ----"); // marker use by py script
// add header for CSV
Serial.print("device name,device type,product_id,shortname,fullname,type [(enum values) | (min/max)],uom,writeable,discovery_entityid");
Serial.print("device name,device type,product id,shortname,fullname,type [options...] \\| (min/max),uom,writeable,discovery entityid v3.4, discovery entityid");
Serial.println();
for (const auto & device_class : EMSFactory::device_handlers()) {
@@ -323,7 +323,12 @@ void EMSESP::dump_all_values(uuid::console::Shell & shell) {
uint8_t device_id = 0;
// Mixer class looks at device_id to determine type, so fixing to 0x28 which will give all the settings except flowSetTemp
if ((device.device_type == DeviceType::MIXER) && (device.flags == EMSdevice::EMS_DEVICE_FLAG_MMPLUS)) {
device_id = 0x28; // hard code
// pick one as hc and the other as having wwc
if (device.product_id == 160) { // MM100
device_id = 0x28; // wwc
} else {
device_id = 0x20; // hc
}
}
emsdevices.push_back(