[miio] update readme (#9014)

* [miio] update readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel
2020-11-16 21:26:50 +01:00
committed by GitHub
parent b523c873cc
commit d6d68c7a96
3 changed files with 26 additions and 10 deletions

View File

@@ -79,8 +79,14 @@ public class ReadmeHelper {
}
private StringWriter deviceList() {
long items = Arrays.asList(MiIoDevices.values()).stream()
.filter(device -> !device.getThingType().equals(MiIoBindingConstants.THING_TYPE_UNSUPPORTED)).count();
String devicesCount = String.format("Currently the miio binding supports more than %d different models.",
(items / 10) * 10);
LOGGER.info(devicesCount);
StringWriter sw = new StringWriter();
sw.write(devicesCount);
sw.write("\r\n\r\n");
sw.write(
"| Device | ThingType | Device Model | Supported | Remark |\r\n");
sw.write(
@@ -177,7 +183,9 @@ public class ReadmeHelper {
for (MiIoBasicDevice entry : findDatabaseEntrys()) {
for (String id : entry.getDevice().getId()) {
if (!MiIoDevices.getType(id).getThingType().equals(MiIoBindingConstants.THING_TYPE_BASIC)) {
LOGGER.info("id :" + id + " not found");
LOGGER.info("id : {} " + id
+ " not found. Suggested line to add to MiIoDevices.java: {}(\"{}\", \"{}\", THING_TYPE_BASIC),",
id, id.toUpperCase().replace(".", "_"), id, id);
}
}
}