]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] Fix readme for line breaks inside table cell (#9052)
authorMarcel <marcelrv@users.noreply.github.com>
Tue, 17 Nov 2020 18:46:20 +0000 (19:46 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Nov 2020 18:46:20 +0000 (10:46 -0800)
* [miio] Fix readme for line breaks inside table cell
* [miio] improve readme

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
bundles/org.openhab.binding.miio/README.md
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java
bundles/org.openhab.binding.miio/src/main/resources/database/mijia.vacuum.v2-miot.json
bundles/org.openhab.binding.miio/src/test/java/org/openhab/binding/miio/internal/ReadmeHelper.java

index f0f96d84ef01d702492492b263e52d77a4e60689..e73d51ad361a89a11c02dcfde36d6c1e89e43277 100644 (file)
@@ -146,10 +146,10 @@ Currently the miio binding supports more than 200 different models.
 | Xiaomi Mijia Smart Tower Fan | miio:basic       | [dmaker.fan.p9](#dmaker-fan-p9) | Yes       |            |
 | Xiaomi Mijia Smart Tower Fan | miio:basic       | [dmaker.fan.p10](#dmaker-fan-p10) | Yes       |            |
 | Viomi Internet refrigerator iLive | miio:unsupported | viomi.fridge.v3        | No        |            |
-| Mi Smart Home Gateway v1     | miio:basic       | [lumi.gateway.v1](#lumi-gateway-v1) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway. Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
-| Mi Smart Home Gateway v2     | miio:basic       | [lumi.gateway.v2](#lumi-gateway-v2) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway. Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
-| Mi Smart Home Gateway v3     | miio:basic       | [lumi.gateway.v3](#lumi-gateway-v3) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway. Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
-| Xiaomi Mi Mijia Gateway V3 ZNDMWG03LM | miio:basic       | [lumi.gateway.mgl03](#lumi-gateway-mgl03) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway. Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
+| Mi Smart Home Gateway v1     | miio:basic       | [lumi.gateway.v1](#lumi-gateway-v1) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
+| Mi Smart Home Gateway v2     | miio:basic       | [lumi.gateway.v2](#lumi-gateway-v2) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
+| Mi Smart Home Gateway v3     | miio:basic       | [lumi.gateway.v3](#lumi-gateway-v3) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
+| Xiaomi Mi Mijia Gateway V3 ZNDMWG03LM | miio:basic       | [lumi.gateway.mgl03](#lumi-gateway-mgl03) | Yes       | Used to control the gateway itself. Use the mihome binding to control devices connected to the Xiaomi gateway.<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
 | Mi Humdifier                 | miio:basic       | [zhimi.humidifier.v1](#zhimi-humidifier-v1) | Yes       |            |
 | Light Control (Wall Switch)  | miio:unsupported | lumi.ctrl_neutral1.v1  | No        |            |
 | Light Control (Wall Switch)  | miio:unsupported | lumi.ctrl_neutral2.v1  | No        |            |
@@ -157,16 +157,9 @@ Currently the miio binding supports more than 200 different models.
 | Mr Bond M1 Pro Smart Clothes Dryer | miio:basic       | [mrbond.airer.m1pro](#mrbond-airer-m1pro) | Yes       | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
 | Mr Bond M1 Smart Clothes Dryer | miio:basic       | [mrbond.airer.m1s](#mrbond-airer-m1s) | Yes       | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
 | Mr Bond M1 Super Smart Clothes Dryer | miio:basic       | [mrbond.airer.m1super](#mrbond-airer-m1super) | Yes       | Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
-|  Xiaomi Mi Robot Vacuum MOP Essential | miio:basic       | [mijia.vacuum.v2](#mijia-vacuum-v2) | Yes       | Action commands are unknown at this time. According to spec identified actions for execution are:
-`action{"did":"vacuum-start-sweep","siid":2,"aiid":1,"in":[]}`
-`action{"did":"vacuum-stop-sweeping","siid":2,"aiid":2,"in":[]}`
-`action{"did":"vacuum-start-charge","siid":2,"aiid":3,"in":[]}`
-`action{"did":"filter-reset-filter-life","siid":11,"aiid":1,"in":[]}`
-`action{"did":"brush-cleaner-reset-brush-life","siid":14,"aiid":1,"in":[]}`
-`action{"did":"brush-cleaner-reset-brush-life","siid":15,"aiid":1,"in":[]}`
-. Please test and feedback if they are working to they can be linked to a channel. |
-| Xiaomi Scishare smart capsule coffee machine | miio:basic       | [scishare.coffee.s1102](#scishare-coffee-s1102) | Yes       | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels. Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
-| Xiaomi Scishare smart capsule coffee machine | miio:basic       | [scishare.coffee.s1301](#scishare-coffee-s1301) | Yes       | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels. Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
+| Xiaomi Mi Robot Vacuum MOP Essential | miio:basic       | [mijia.vacuum.v2](#mijia-vacuum-v2) | Yes       | Action commands are unknown at this time. According to spec identified actions for execution are:<br />`action{"did":"vacuum-start-sweep","siid":2,"aiid":1,"in":[]}`<br />`action{"did":"vacuum-stop-sweeping","siid":2,"aiid":2,"in":[]}`<br />`action{"did":"vacuum-start-charge","siid":2,"aiid":3,"in":[]}`<br />`action{"did":"filter-reset-filter-life","siid":11,"aiid":1,"in":[]}`<br />`action{"did":"brush-cleaner-reset-brush-life","siid":14,"aiid":1,"in":[]}`<br />`action{"did":"brush-cleaner-reset-brush-life","siid":15,"aiid":1,"in":[]}`<br />Please test and feedback if they are working to they can be linked to a channel. |
+| Xiaomi Scishare smart capsule coffee machine | miio:basic       | [scishare.coffee.s1102](#scishare-coffee-s1102) | Yes       | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels.<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
+| Xiaomi Scishare smart capsule coffee machine | miio:basic       | [scishare.coffee.s1301](#scishare-coffee-s1301) | Yes       | This device does not allow for regular querying for the status. Hence the status is not updated for the action channels.<br />Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses |
 | Xiaomi Philips Eyecare Smart Lamp 2 | miio:basic       | [philips.light.sread1](#philips-light-sread1) | Yes       |            |
 | Xiaomi Philips Eyecare Smart Lamp 2 | miio:basic       | [philips.light.sread2](#philips-light-sread2) | Yes       |            |
 | Xiaomi Philips LED Ceiling Lamp | miio:basic       | [philips.light.ceiling](#philips-light-ceiling) | Yes       |            |
@@ -1300,11 +1293,11 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena
 | current-position | Number  | Curtain - Current Position          |            |
 | status           | Number  | Curtain - Status                    | Value mapping [0="Stopped",1="Opening",2="Closing"] |
 | target-position  | Number  | Curtain - Target Position           |            |
-| manual-enabled   | Number  | curtain_cfg - manual_enabled        | Value mapping [0="Disable",1="Enable"] |
-| polarity         | Number  | curtain_cfg - polarity              | Value mapping [0="Positive",1="Reverse"] |
-| pos-limit        | Number  | curtain_cfg - pos_limit             | Value mapping [0="Unlimit",1="Limit"] |
-| en-night-tip-light | Switch  | Set night tip light                 | Value mapping [0="Disable",1="Enable"] |
-| run-time         | Number  | curtain_cfg - run_time              |            |
+| manual-enabled   | Number  | curtain_cfg - Manual Enabled        | Value mapping [0="Disable",1="Enable"] |
+| polarity         | Number  | curtain_cfg - Polarity              | Value mapping [0="Positive",1="Reverse"] |
+| pos-limit        | Number  | curtain_cfg - Position Limit        | Value mapping [0="Unlimit",1="Limit"] |
+| en-night-tip-light | Switch  | Set Night Tip Light                 | Value mapping [0="Disable",1="Enable"] |
+| run-time         | Number  | curtain_cfg - Run-time              |            |
 
 ### Mr Bond M1 Pro Smart Clothes Dryer (<a name="mrbond-airer-m1pro">mrbond.airer.m1pro</a>) Channels
 
@@ -1342,7 +1335,7 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena
 | disinfect        | Switch  | disinfect                           |            |
 | distime          | Number  | Disinfect Time                      |            |
 
-###  Xiaomi Mi Robot Vacuum MOP Essential (<a name="mijia-vacuum-v2">mijia.vacuum.v2</a>) Channels
+### Xiaomi Mi Robot Vacuum MOP Essential (<a name="mijia-vacuum-v2">mijia.vacuum.v2</a>) Channels
 
 | Channel          | Type    | Description                         | Comment    |
 |------------------|---------|-------------------------------------|------------|
@@ -4291,11 +4284,11 @@ Number fault "Curtain - Device Fault" (G_curtain) {channel="miio:basic:curtain:f
 Number current-position "Curtain - Current Position" (G_curtain) {channel="miio:basic:curtain:current-position"}
 Number status "Curtain - Status" (G_curtain) {channel="miio:basic:curtain:status"}
 Number target-position "Curtain - Target Position" (G_curtain) {channel="miio:basic:curtain:target-position"}
-Number manual-enabled "curtain_cfg - manual_enabled" (G_curtain) {channel="miio:basic:curtain:manual-enabled"}
-Number polarity "curtain_cfg - polarity" (G_curtain) {channel="miio:basic:curtain:polarity"}
-Number pos-limit "curtain_cfg - pos_limit" (G_curtain) {channel="miio:basic:curtain:pos-limit"}
-Switch en-night-tip-light "Set night tip light" (G_curtain) {channel="miio:basic:curtain:en-night-tip-light"}
-Number run-time "curtain_cfg - run_time" (G_curtain) {channel="miio:basic:curtain:run-time"}
+Number manual-enabled "curtain_cfg - Manual Enabled" (G_curtain) {channel="miio:basic:curtain:manual-enabled"}
+Number polarity "curtain_cfg - Polarity" (G_curtain) {channel="miio:basic:curtain:polarity"}
+Number pos-limit "curtain_cfg - Position Limit" (G_curtain) {channel="miio:basic:curtain:pos-limit"}
+Switch en-night-tip-light "Set Night Tip Light" (G_curtain) {channel="miio:basic:curtain:en-night-tip-light"}
+Number run-time "curtain_cfg - Run-time" (G_curtain) {channel="miio:basic:curtain:run-time"}
 ```
 
 ### Mr Bond M1 Pro Smart Clothes Dryer (mrbond.airer.m1pro) item file lines
@@ -4343,12 +4336,12 @@ Switch disinfect "disinfect" (G_airer) {channel="miio:basic:airer:disinfect"}
 Number distime "Disinfect Time" (G_airer) {channel="miio:basic:airer:distime"}
 ```
 
-###  Xiaomi Mi Robot Vacuum MOP Essential (mijia.vacuum.v2) item file lines
+### Xiaomi Mi Robot Vacuum MOP Essential (mijia.vacuum.v2) item file lines
 
 note: Autogenerated example. Replace the id (vacuum) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
 
 ```java
-Group G_vacuum " Xiaomi Mi Robot Vacuum MOP Essential" <status>
+Group G_vacuum "Xiaomi Mi Robot Vacuum MOP Essential" <status>
 String vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"}
 Number status "Robot Cleaner - Status" (G_vacuum) {channel="miio:basic:vacuum:status"}
 Number fault "Robot Cleaner - Device Fault" (G_vacuum) {channel="miio:basic:vacuum:fault"}
index 8044452c7d9bf5609616929b15338b52c79513c3..18eb0675a1c9a861296a8d72b4d412b477ae12b6 100644 (file)
@@ -93,7 +93,7 @@ public enum MiIoDevices {
     MRBOND_AIRER_M1PRO("mrbond.airer.m1pro", "Mr Bond M1 Pro Smart Clothes Dryer", THING_TYPE_BASIC),
     MRBOND_AIRER_M1S("mrbond.airer.m1s", "Mr Bond M1 Smart Clothes Dryer", THING_TYPE_BASIC),
     MRBOND_AIRER_M1SUPER("mrbond.airer.m1super", "Mr Bond M1 Super Smart Clothes Dryer", THING_TYPE_BASIC),
-    MIJIA_VACUUM_V2("mijia.vacuum.v2", " Xiaomi Mi Robot Vacuum MOP Essential", THING_TYPE_BASIC),
+    MIJIA_VACUUM_V2("mijia.vacuum.v2", "Xiaomi Mi Robot Vacuum MOP Essential", THING_TYPE_BASIC),
     SCISHARE_COFFEE_S1102("scishare.coffee.s1102", "Xiaomi Scishare smart capsule coffee machine", THING_TYPE_BASIC),
     SCISHARE_COFFEE_S1301("scishare.coffee.s1301", "Xiaomi Scishare smart capsule coffee machine", THING_TYPE_BASIC),
     PHILIPS_SR1("philips.light.sread1", "Xiaomi Philips Eyecare Smart Lamp 2", THING_TYPE_BASIC),
index 7e3de4b7dfe99d972479407887f8a907bc0124ac..eb4a05afa0c1129ac7fb01d950b6d55dc626c279 100644 (file)
                                "readmeComment": "Value mapping [0\u003d\"MopUninstall\",1\u003d\"MopInstall\"]"
                        }
                ],
-               "readmeComment": "Action commands are unknown at this time. According to spec identified actions for execution are:\r\n`action{\"did\":\"vacuum-start-sweep\",\"siid\":2,\"aiid\":1,\"in\":[]}`\r\n`action{\"did\":\"vacuum-stop-sweeping\",\"siid\":2,\"aiid\":2,\"in\":[]}`\r\n`action{\"did\":\"vacuum-start-charge\",\"siid\":2,\"aiid\":3,\"in\":[]}`\r\n`action{\"did\":\"filter-reset-filter-life\",\"siid\":11,\"aiid\":1,\"in\":[]}`\r\n`action{\"did\":\"brush-cleaner-reset-brush-life\",\"siid\":14,\"aiid\":1,\"in\":[]}`\r\n`action{\"did\":\"brush-cleaner-reset-brush-life\",\"siid\":15,\"aiid\":1,\"in\":[]}`\r\n. Please test and feedback if they are working to they can be linked to a channel."
+               "readmeComment": "Action commands are unknown at this time. According to spec identified actions for execution are:<br />`action{\"did\":\"vacuum-start-sweep\",\"siid\":2,\"aiid\":1,\"in\":[]}`<br />`action{\"did\":\"vacuum-stop-sweeping\",\"siid\":2,\"aiid\":2,\"in\":[]}`<br />`action{\"did\":\"vacuum-start-charge\",\"siid\":2,\"aiid\":3,\"in\":[]}`<br />`action{\"did\":\"filter-reset-filter-life\",\"siid\":11,\"aiid\":1,\"in\":[]}`<br />`action{\"did\":\"brush-cleaner-reset-brush-life\",\"siid\":14,\"aiid\":1,\"in\":[]}`<br />`action{\"did\":\"brush-cleaner-reset-brush-life\",\"siid\":15,\"aiid\":1,\"in\":[]}`<br />Please test and feedback if they are working to they can be linked to a channel."
        }
 }
index 090e22b9579bdad100e4819273fee2e76fc9f179..877a477efc1a02483011cad81e71bf19fa9bf33f 100644 (file)
@@ -103,7 +103,7 @@ public class ReadmeHelper {
                         remark = dev.getDevice().getReadmeComment();
                         final Boolean experimental = dev.getDevice().getExperimental();
                         if (experimental != null && experimental.booleanValue()) {
-                            remark += (remark.isBlank() ? "" : " ")
+                            remark += (remark.isBlank() ? "" : "<br />")
                                     + "Experimental support. Please report back if all channels are functional. Preferably share the debug log of property refresh and command responses";
                         }
                     }