| power | Switch | Power | |
| angleEnable | Switch | Rotation | |
| usedhours | Number:Time | Run Time | |
-| angle | Number | Angle | |
-| poweroffTime | Number | Timer | |
+| angle | Number:Angle | Angle | Value mapping `["30"="30","60"="60","90"="90","120"="120"]` |
+| poweroffTime | Number:Time | Power-Off Timer | |
| buzzer | Switch | Buzzer | |
-| led_b | Number | LED | |
+| led_b | Number | LED | Value mapping `["0"="Bright","1"="Dimmed","2"="Off"]` |
| child_lock | Switch | Child Lock | |
-| speedLevel | Number | Speed Level | |
+| speedLevel | Dimmer | Speed Level | |
| speed | Number | Speed | |
-| naturalLevel | Number | Natural Level | |
+| naturalLevel | Dimmer | Natural Level | |
| acPower | Switch | AC Power | |
-| move | String | Move Direction | |
+| move | String | Move Direction | Value mapping `[""="None","left"="Left","right"="Right"]` |
### Mi Smart Fan (<a name="zhimi-fan-v1">zhimi.fan.v1</a>) Channels
| power | Switch | Power | |
| angleEnable | Switch | Rotation | |
| usedhours | Number:Time | Run Time | |
-| angle | Number | Angle | |
-| poweroffTime | Number | Timer | |
+| angle | Number:Angle | Angle | Value mapping `["30"="30","60"="60","90"="90","120"="120"]` |
+| poweroffTime | Number:Time | Power-Off Timer | |
| buzzer | Switch | Buzzer | |
-| led_b | Number | LED | |
+| led_b | Number | LED | Value mapping `["0"="Bright","1"="Dimmed","2"="Off"]` |
| child_lock | Switch | Child Lock | |
-| speedLevel | Number | Speed Level | |
+| speedLevel | Dimmer | Speed Level | |
| speed | Number | Speed | |
-| naturalLevel | Number | Natural Level | |
+| naturalLevel | Dimmer | Natural Level | |
| temp_dec | Number | Temperature | |
| humidity | Number:Dimensionless | Humidity | |
-| acPower | String | AC Power | |
+| acPower | Switch | AC Power | |
| mode | String | Battery Charge | |
| battery | Number | Battery | |
-| move | String | Move Direction | |
+| move | String | Move Direction | Value mapping `[""="None","left"="Left","right"="Right"]` |
### Smartmi DC Pedestal Fan (<a name="zhimi-fan-v2">zhimi.fan.v2</a>) Channels
| power | Switch | Power | |
| angleEnable | Switch | Rotation | |
| usedhours | Number:Time | Run Time | |
-| angle | Number | Angle | |
-| poweroffTime | Number | Timer | |
+| angle | Number:Angle | Angle | Value mapping `["30"="30","60"="60","90"="90","120"="120"]` |
+| poweroffTime | Number:Time | Power-Off Timer | |
| buzzer | Switch | Buzzer | |
-| led_b | Number | LED | |
+| led_b | Number | LED | Value mapping `["0"="Bright","1"="Dimmed","2"="Off"]` |
| child_lock | Switch | Child Lock | |
-| speedLevel | Number | Speed Level | |
+| speedLevel | Dimmer | Speed Level | |
| speed | Number | Speed | |
-| naturalLevel | Number | Natural Level | |
+| naturalLevel | Dimmer | Natural Level | |
| temp_dec | Number | Temperature | |
| humidity | Number:Dimensionless | Humidity | |
-| acPower | String | AC Power | |
+| acPower | Switch | AC Power | |
| mode | String | Battery Charge | |
| battery | Number | Battery | |
-| move | String | Move Direction | |
+| move | String | Move Direction | Value mapping `[""="None","left"="Left","right"="Right"]` |
### Smartmi DC Pedestal Fan (<a name="zhimi-fan-v3">zhimi.fan.v3</a>) Channels
| power | Switch | Power | |
| angleEnable | Switch | Rotation | |
| usedhours | Number:Time | Run Time | |
-| angle | Number | Angle | |
-| poweroffTime | Number | Timer | |
+| angle | Number:Angle | Angle | Value mapping `["30"="30","60"="60","90"="90","120"="120"]` |
+| poweroffTime | Number:Time | Power-Off Timer | |
| buzzer | Switch | Buzzer | |
-| led_b | Number | LED | |
+| led_b | Number | LED | Value mapping `["0"="Bright","1"="Dimmed","2"="Off"]` |
| child_lock | Switch | Child Lock | |
-| speedLevel | Number | Speed Level | |
+| speedLevel | Dimmer | Speed Level | |
| speed | Number | Speed | |
-| naturalLevel | Number | Natural Level | |
+| naturalLevel | Dimmer | Natural Level | |
| temp_dec | Number | Temperature | |
| humidity | Number:Dimensionless | Humidity | |
-| acPower | String | AC Power | |
+| acPower | Switch | AC Power | |
| mode | String | Battery Charge | |
| battery | Number | Battery | |
-| move | String | Move Direction | |
+| move | String | Move Direction | Value mapping `[""="None","left"="Left","right"="Right"]` |
### Smartmi Inverter Pedestal Fan (<a name="zhimi-fan-za1">zhimi.fan.za1</a>) Channels
| power | Switch | Power | |
| angleEnable | Switch | Rotation | |
| usedhours | Number:Time | Run Time | |
-| angle | Number | Angle | |
-| poweroffTime | Number | Timer | |
+| angle | Number:Angle | Angle | Value mapping `["30"="30","60"="60","90"="90","120"="120"]` |
+| poweroffTime | Number:Time | Power-Off Timer | |
| buzzer | Switch | Buzzer | |
-| led_b | Number | LED | |
+| led_b | Number | LED | Value mapping `["0"="Bright","1"="Dimmed","2"="Off"]` |
| child_lock | Switch | Child Lock | |
-| speedLevel | Number | Speed Level | |
+| speedLevel | Dimmer | Speed Level | |
| speed | Number | Speed | |
-| naturalLevel | Number | Natural Level | |
+| naturalLevel | Dimmer | Natural Level | |
| acPower | Switch | AC Power | |
-| move | String | Move Direction | |
+| move | String | Move Direction | Value mapping `[""="None","left"="Left","right"="Right"]` |
### Smartmi Standing Fan 2 (<a name="zhimi-fan-za3">zhimi.fan.za3</a>) Channels
Switch power "Power" (G_fan) {channel="miio:basic:fan:power"}
Switch angleEnable "Rotation" (G_fan) {channel="miio:basic:fan:angleEnable"}
Number:Time usedhours "Run Time" (G_fan) {channel="miio:basic:fan:usedhours"}
-Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
-Number poweroffTime "Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
+Number:Angle angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
+Number:Time poweroffTime "Power-Off Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
Switch buzzer "Buzzer" (G_fan) {channel="miio:basic:fan:buzzer"}
Number led_b "LED" (G_fan) {channel="miio:basic:fan:led_b"}
Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"}
-Number speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
+Dimmer speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"}
-Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
+Dimmer naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
Switch acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"}
```
Switch power "Power" (G_fan) {channel="miio:basic:fan:power"}
Switch angleEnable "Rotation" (G_fan) {channel="miio:basic:fan:angleEnable"}
Number:Time usedhours "Run Time" (G_fan) {channel="miio:basic:fan:usedhours"}
-Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
-Number poweroffTime "Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
+Number:Angle angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
+Number:Time poweroffTime "Power-Off Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
Switch buzzer "Buzzer" (G_fan) {channel="miio:basic:fan:buzzer"}
Number led_b "LED" (G_fan) {channel="miio:basic:fan:led_b"}
Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"}
-Number speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
+Dimmer speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"}
-Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
+Dimmer naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
Number temp_dec "Temperature" (G_fan) {channel="miio:basic:fan:temp_dec"}
Number:Dimensionless humidity "Humidity" (G_fan) {channel="miio:basic:fan:humidity"}
-String acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
+Switch acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
String mode "Battery Charge" (G_fan) {channel="miio:basic:fan:mode"}
Number battery "Battery" (G_fan) {channel="miio:basic:fan:battery"}
String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"}
Switch power "Power" (G_fan) {channel="miio:basic:fan:power"}
Switch angleEnable "Rotation" (G_fan) {channel="miio:basic:fan:angleEnable"}
Number:Time usedhours "Run Time" (G_fan) {channel="miio:basic:fan:usedhours"}
-Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
-Number poweroffTime "Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
+Number:Angle angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
+Number:Time poweroffTime "Power-Off Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
Switch buzzer "Buzzer" (G_fan) {channel="miio:basic:fan:buzzer"}
Number led_b "LED" (G_fan) {channel="miio:basic:fan:led_b"}
Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"}
-Number speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
+Dimmer speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"}
-Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
+Dimmer naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
Number temp_dec "Temperature" (G_fan) {channel="miio:basic:fan:temp_dec"}
Number:Dimensionless humidity "Humidity" (G_fan) {channel="miio:basic:fan:humidity"}
-String acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
+Switch acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
String mode "Battery Charge" (G_fan) {channel="miio:basic:fan:mode"}
Number battery "Battery" (G_fan) {channel="miio:basic:fan:battery"}
String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"}
Switch power "Power" (G_fan) {channel="miio:basic:fan:power"}
Switch angleEnable "Rotation" (G_fan) {channel="miio:basic:fan:angleEnable"}
Number:Time usedhours "Run Time" (G_fan) {channel="miio:basic:fan:usedhours"}
-Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
-Number poweroffTime "Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
+Number:Angle angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
+Number:Time poweroffTime "Power-Off Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
Switch buzzer "Buzzer" (G_fan) {channel="miio:basic:fan:buzzer"}
Number led_b "LED" (G_fan) {channel="miio:basic:fan:led_b"}
Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"}
-Number speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
+Dimmer speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"}
-Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
+Dimmer naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
Number temp_dec "Temperature" (G_fan) {channel="miio:basic:fan:temp_dec"}
Number:Dimensionless humidity "Humidity" (G_fan) {channel="miio:basic:fan:humidity"}
-String acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
+Switch acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
String mode "Battery Charge" (G_fan) {channel="miio:basic:fan:mode"}
Number battery "Battery" (G_fan) {channel="miio:basic:fan:battery"}
String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"}
Switch power "Power" (G_fan) {channel="miio:basic:fan:power"}
Switch angleEnable "Rotation" (G_fan) {channel="miio:basic:fan:angleEnable"}
Number:Time usedhours "Run Time" (G_fan) {channel="miio:basic:fan:usedhours"}
-Number angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
-Number poweroffTime "Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
+Number:Angle angle "Angle" (G_fan) {channel="miio:basic:fan:angle"}
+Number:Time poweroffTime "Power-Off Timer" (G_fan) {channel="miio:basic:fan:poweroffTime"}
Switch buzzer "Buzzer" (G_fan) {channel="miio:basic:fan:buzzer"}
Number led_b "LED" (G_fan) {channel="miio:basic:fan:led_b"}
Switch child_lock "Child Lock" (G_fan) {channel="miio:basic:fan:child_lock"}
-Number speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
+Dimmer speedLevel "Speed Level" (G_fan) {channel="miio:basic:fan:speedLevel"}
Number speed "Speed" (G_fan) {channel="miio:basic:fan:speed"}
-Number naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
+Dimmer naturalLevel "Natural Level" (G_fan) {channel="miio:basic:fan:naturalLevel"}
Switch acPower "AC Power" (G_fan) {channel="miio:basic:fan:acPower"}
String move "Move Direction" (G_fan) {channel="miio:basic:fan:move"}
```
*/
package org.openhab.binding.miio.internal.basic;
-import java.util.concurrent.TimeUnit;
-
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class Conversions {
private static final Logger LOGGER = LoggerFactory.getLogger(Conversions.class);
- public static JsonElement secondsToHours(JsonElement seconds) {
- long hours = TimeUnit.SECONDS.toHours(seconds.getAsInt());
- return new JsonPrimitive(hours);
+ public static JsonElement secondsToHours(JsonElement seconds) throws ClassCastException {
+ double value = seconds.getAsDouble() / 3600;
+ return new JsonPrimitive(value);
}
- public static JsonElement yeelightSceneConversion(JsonElement intValue) {
+ public static JsonElement yeelightSceneConversion(JsonElement intValue)
+ throws ClassCastException, IllegalStateException {
switch (intValue.getAsInt()) {
case 1:
return new JsonPrimitive("color");
}
}
- public static JsonElement divideTen(JsonElement value10) {
+ public static JsonElement divideTen(JsonElement value10) throws ClassCastException, IllegalStateException {
double value = value10.getAsDouble() / 10.0;
return new JsonPrimitive(value);
}
- public static JsonElement divideHundred(JsonElement value10) {
+ public static JsonElement divideHundred(JsonElement value10) throws ClassCastException, IllegalStateException {
double value = value10.getAsDouble() / 100.0;
return new JsonPrimitive(value);
}
- public static JsonElement tankLevel(JsonElement value12) {
+ public static JsonElement tankLevel(JsonElement value12) throws ClassCastException, IllegalStateException {
// 127 without water tank. 120 = 100% water
if (value12.getAsInt() == 127) {
return new JsonPrimitive(-1);
}
public static JsonElement execute(String transfortmation, JsonElement value) {
- switch (transfortmation.toUpperCase()) {
- case "YEELIGHTSCENEID":
- return yeelightSceneConversion(value);
- case "SECONDSTOHOURS":
- return secondsToHours(value);
- case "/10":
- return divideTen(value);
- case "/100":
- return divideHundred(value);
- case "TANKLEVEL":
- return tankLevel(value);
- default:
- LOGGER.debug("Transformation {} not found. Returning '{}'", transfortmation, value.toString());
- return value;
+ try {
+ switch (transfortmation.toUpperCase()) {
+ case "YEELIGHTSCENEID":
+ return yeelightSceneConversion(value);
+ case "SECONDSTOHOURS":
+ return secondsToHours(value);
+ case "/10":
+ return divideTen(value);
+ case "/100":
+ return divideHundred(value);
+ case "TANKLEVEL":
+ return tankLevel(value);
+ default:
+ LOGGER.debug("Transformation {} not found. Returning '{}'", transfortmation, value.toString());
+ return value;
+ }
+ } catch (ClassCastException | IllegalStateException e) {
+ LOGGER.debug("Transformation {} failed. Returning '{}'", transfortmation, value.toString());
+ return value;
}
}
}
"property": "power",
"friendlyName": "Power",
"channel": "power",
- "channelType": "power",
"type": "Switch",
"refresh": true,
"actions": [
"property": "angle_enable",
"friendlyName": "Rotation",
"channel": "angleEnable",
- "channelType": "angleEnable",
"type": "Switch",
"refresh": true,
"actions": [
"command": "set_angle_enable",
"parameterType": "ONOFF"
}
+ ],
+ "category": "switch",
+ "tags": [
+ "Switch"
]
},
{
"property": "use_time",
"friendlyName": "Run Time",
"channel": "usedhours",
- "channelType": "usedhours",
"type": "Number:Time",
"unit": "hours",
"refresh": true,
"transformation": "SecondsToHours",
- "ChannelGroup": "Status",
"actions": [],
- "category": "time"
+ "category": "time",
+ "tags": [
+ "Measurement",
+ "Duration"
+ ]
},
{
"property": "angle",
"friendlyName": "Angle",
"channel": "angle",
- "channelType": "angle",
- "type": "Number",
+ "type": "Number:Angle",
+ "unit": "degree",
+ "stateDescription": {
+ "options": [
+ {
+ "value": "30",
+ "label": "30"
+ },
+ {
+ "value": "60",
+ "label": "60"
+ },
+ {
+ "value": "90",
+ "label": "90"
+ },
+ {
+ "value": "120",
+ "label": "120"
+ }
+ ]
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_angle",
"parameterType": "NUMBER"
}
- ]
+ ],
+ "category": "incline",
+ "tags": [
+ "Setpoint"
+ ],
+ "readmeComment": "Value mapping `[\"30\"\u003d\"30\",\"60\"\u003d\"60\",\"90\"\u003d\"90\",\"120\"\u003d\"120\"]`"
},
{
"property": "poweroff_time",
- "friendlyName": "Timer",
+ "friendlyName": "Power-Off Timer",
"channel": "poweroffTime",
- "channelType": "poweroffTime",
- "type": "Number",
+ "type": "Number:Time",
+ "unit": "hours",
"refresh": true,
- "ChannelGroup": "actions",
+ "transformation": "SecondsToHours",
"actions": [
{
"command": "set_poweroff_time",
"parameterType": "NUMBER"
}
+ ],
+ "category": "time",
+ "tags": [
+ "Setpoint",
+ "Duration"
]
},
{
"property": "buzzer",
"friendlyName": "Buzzer",
"channel": "buzzer",
- "channelType": "buzzer",
"type": "Switch",
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_buzzer",
"parameterType": "ONOFF"
}
+ ],
+ "category": "soundvolume",
+ "tags": [
+ "Switch"
]
},
{
"friendlyName": "LED",
"channel": "led_b",
"type": "Number",
+ "stateDescription": {
+ "options": [
+ {
+ "value": "0",
+ "label": "Bright"
+ },
+ {
+ "value": "1",
+ "label": "Dimmed"
+ },
+ {
+ "value": "2",
+ "label": "Off"
+ }
+ ]
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_led_b",
"parameterType": "NUMBER"
}
- ]
+ ],
+ "category": "light",
+ "tags": [
+ "Control"
+ ],
+ "readmeComment": "Value mapping `[\"0\"\u003d\"Bright\",\"1\"\u003d\"Dimmed\",\"2\"\u003d\"Off\"]`"
},
{
"property": "child_lock",
"channel": "child_lock",
"type": "Switch",
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_child_lock",
"parameterType": "ONOFF"
}
+ ],
+ "category": "lock",
+ "tags": [
+ "Control"
]
},
{
"property": "speed_level",
"friendlyName": "Speed Level",
"channel": "speedLevel",
- "channelType": "speedLevel",
- "type": "Number",
+ "type": "Dimmer",
+ "stateDescription": {
+ "minimum": 1,
+ "maximum": 100,
+ "step": 1,
+ "pattern": "%.0f %%"
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_speed_level",
"parameterType": "NUMBER"
}
+ ],
+ "category": "fan",
+ "tags": [
+ "Setpoint",
+ "Level"
]
},
{
"property": "speed",
"friendlyName": "Speed",
"channel": "speed",
- "channelType": "speed",
"type": "Number",
+ "stateDescription": {
+ "pattern": "%.0f RPM",
+ "readOnly": true
+ },
"refresh": true,
- "ChannelGroup": "actions",
- "actions": [
- {
- "command": "set_speed",
- "parameterType": "NUMBER"
- }
+ "actions": [],
+ "category": "fan",
+ "tags": [
+ "Measurement",
+ "Level"
]
},
{
"property": "natural_level",
"friendlyName": "Natural Level",
"channel": "naturalLevel",
- "channelType": "naturalLevel",
- "type": "Number",
+ "type": "Dimmer",
+ "stateDescription": {
+ "minimum": 1,
+ "maximum": 100,
+ "step": 1,
+ "pattern": "%.0f %%"
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_natural_level",
"parameterType": "NUMBER"
}
+ ],
+ "category": "flow",
+ "tags": [
+ "Setpoint",
+ "Level"
]
},
{
"property": "ac_power",
"friendlyName": "AC Power",
"channel": "acPower",
- "channelType": "acPower",
"type": "Switch",
+ "stateDescription": {
+ "readOnly": true
+ },
"refresh": true,
- "ChannelGroup": "Status",
- "actions": []
+ "actions": [],
+ "category": "poweroutlet_eu",
+ "tags": [
+ "Switch"
+ ]
},
{
"property": "",
"friendlyName": "Move Direction",
"channel": "move",
- "channelType": "move",
"type": "String",
+ "stateDescription": {
+ "options": [
+ {
+ "value": "",
+ "label": "None"
+ },
+ {
+ "value": "left",
+ "label": "Left"
+ },
+ {
+ "value": "right",
+ "label": "Right"
+ }
+ ]
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_move",
"parameterType": "STRING"
}
- ]
+ ],
+ "category": "movecontrol",
+ "tags": [
+ "Control"
+ ],
+ "readmeComment": "Value mapping `[\"\"\u003d\"None\",\"left\"\u003d\"Left\",\"right\"\u003d\"Right\"]`"
}
]
}
"property": "power",
"friendlyName": "Power",
"channel": "power",
- "channelType": "power",
"type": "Switch",
"refresh": true,
"actions": [
"property": "angle_enable",
"friendlyName": "Rotation",
"channel": "angleEnable",
- "channelType": "angleEnable",
"type": "Switch",
"refresh": true,
"actions": [
"command": "set_angle_enable",
"parameterType": "ONOFF"
}
+ ],
+ "category": "switch",
+ "tags": [
+ "Switch"
]
},
{
"property": "use_time",
"friendlyName": "Run Time",
"channel": "usedhours",
- "channelType": "usedhours",
"type": "Number:Time",
"unit": "hours",
"refresh": true,
"transformation": "SecondsToHours",
- "ChannelGroup": "Status",
"actions": [],
- "category": "time"
+ "category": "time",
+ "tags": [
+ "Measurement",
+ "Duration"
+ ]
},
{
"property": "angle",
"friendlyName": "Angle",
"channel": "angle",
- "channelType": "angle",
- "type": "Number",
+ "type": "Number:Angle",
+ "unit": "degree",
+ "stateDescription": {
+ "options": [
+ {
+ "value": "30",
+ "label": "30"
+ },
+ {
+ "value": "60",
+ "label": "60"
+ },
+ {
+ "value": "90",
+ "label": "90"
+ },
+ {
+ "value": "120",
+ "label": "120"
+ }
+ ]
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_angle",
"parameterType": "NUMBER"
}
- ]
+ ],
+ "category": "incline",
+ "tags": [
+ "Setpoint"
+ ],
+ "readmeComment": "Value mapping `[\"30\"\u003d\"30\",\"60\"\u003d\"60\",\"90\"\u003d\"90\",\"120\"\u003d\"120\"]`"
},
{
"property": "poweroff_time",
- "friendlyName": "Timer",
+ "friendlyName": "Power-Off Timer",
"channel": "poweroffTime",
- "channelType": "poweroffTime",
- "type": "Number",
+ "type": "Number:Time",
+ "unit": "hours",
"refresh": true,
- "ChannelGroup": "actions",
+ "transformation": "SecondsToHours",
"actions": [
{
"command": "set_poweroff_time",
"parameterType": "NUMBER"
}
+ ],
+ "category": "time",
+ "tags": [
+ "Setpoint",
+ "Duration"
]
},
{
"property": "buzzer",
"friendlyName": "Buzzer",
"channel": "buzzer",
- "channelType": "buzzer",
"type": "Switch",
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_buzzer",
"parameterType": "ONOFF"
}
+ ],
+ "category": "soundvolume",
+ "tags": [
+ "Switch"
]
},
{
"friendlyName": "LED",
"channel": "led_b",
"type": "Number",
+ "stateDescription": {
+ "options": [
+ {
+ "value": "0",
+ "label": "Bright"
+ },
+ {
+ "value": "1",
+ "label": "Dimmed"
+ },
+ {
+ "value": "2",
+ "label": "Off"
+ }
+ ]
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_led_b",
"parameterType": "NUMBER"
}
- ]
+ ],
+ "category": "light",
+ "tags": [
+ "Control"
+ ],
+ "readmeComment": "Value mapping `[\"0\"\u003d\"Bright\",\"1\"\u003d\"Dimmed\",\"2\"\u003d\"Off\"]`"
},
{
"property": "child_lock",
"channel": "child_lock",
"type": "Switch",
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_child_lock",
"parameterType": "ONOFF"
}
+ ],
+ "category": "lock",
+ "tags": [
+ "Control"
]
},
{
"property": "speed_level",
"friendlyName": "Speed Level",
"channel": "speedLevel",
- "channelType": "speedLevel",
- "type": "Number",
+ "type": "Dimmer",
+ "stateDescription": {
+ "minimum": 1,
+ "maximum": 100,
+ "step": 1,
+ "pattern": "%.0f %%"
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_speed_level",
"parameterType": "NUMBER"
}
+ ],
+ "category": "fan",
+ "tags": [
+ "Setpoint",
+ "Level"
]
},
{
"property": "speed",
"friendlyName": "Speed",
"channel": "speed",
- "channelType": "speed",
"type": "Number",
+ "stateDescription": {
+ "pattern": "%.0f RPM",
+ "readOnly": true
+ },
"refresh": true,
- "ChannelGroup": "actions",
- "actions": [
- {
- "command": "set_speed",
- "parameterType": "NUMBER"
- }
+ "actions": [],
+ "category": "fan",
+ "tags": [
+ "Measurement",
+ "Level"
]
},
{
"property": "natural_level",
"friendlyName": "Natural Level",
"channel": "naturalLevel",
- "channelType": "naturalLevel",
- "type": "Number",
+ "type": "Dimmer",
+ "stateDescription": {
+ "minimum": 1,
+ "maximum": 100,
+ "step": 1,
+ "pattern": "%.0f %%"
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_natural_level",
"property": "ac_power",
"friendlyName": "AC Power",
"channel": "acPower",
- "channelType": "acPower",
- "type": "String",
+ "type": "Switch",
+ "stateDescription": {
+ "readOnly": true
+ },
"refresh": true,
- "ChannelGroup": "Status",
- "actions": []
+ "actions": [],
+ "category": "poweroutlet_eu",
+ "tags": [
+ "Switch"
+ ]
},
{
"property": "bat_charge",
"friendlyName": "Battery Charge",
"channel": "mode",
- "channelType": "mode",
"type": "String",
"refresh": true,
- "ChannelGroup": "actions",
- "actions": []
+ "actions": [],
+ "category": "batterylevel"
},
{
"property": "battery",
"channelType": "system:battery-level",
"type": "Number",
"refresh": true,
- "ChannelGroup": "Status",
"actions": []
},
{
"property": "",
"friendlyName": "Move Direction",
"channel": "move",
- "channelType": "move",
"type": "String",
+ "stateDescription": {
+ "options": [
+ {
+ "value": "",
+ "label": "None"
+ },
+ {
+ "value": "left",
+ "label": "Left"
+ },
+ {
+ "value": "right",
+ "label": "Right"
+ }
+ ]
+ },
"refresh": true,
- "ChannelGroup": "actions",
"actions": [
{
"command": "set_move",
"parameterType": "STRING"
}
- ]
+ ],
+ "category": "movecontrol",
+ "tags": [
+ "Control"
+ ],
+ "readmeComment": "Value mapping `[\"\"\u003d\"None\",\"left\"\u003d\"Left\",\"right\"\u003d\"Right\"]`"
}
]
}