[miio] add support for yeelink.light.lamp15 Yeelight Screen Light Bar (#10603)
closes #10589 Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
@@ -303,6 +303,7 @@ public enum MiIoDevices {
|
||||
YEELINK_LIGHT_LAMP6("yeelink.light.lamp6", "Yeelight", THING_TYPE_BASIC),
|
||||
YEELINK_LIGHT_LAMP7("yeelink.light.lamp7", "Yeelight LED Light Sensor Desk Lamp V1", THING_TYPE_BASIC),
|
||||
YEELINK_LIGHT_LAMP8("yeelink.light.lamp8", "Yeelight", THING_TYPE_BASIC),
|
||||
YEELINK_LIGHT_LAMP15("yeelink.light.lamp15", "Yeelight Screen Light Bar", THING_TYPE_BASIC),
|
||||
YEELINK_LIGHT_MONO1("yeelink.light.mono1", "Yeelight Bulb", THING_TYPE_BASIC),
|
||||
YEELINK_LIGHT_MONO2("yeelink.light.mono2", "Yeelight White Bulb v2", THING_TYPE_BASIC),
|
||||
YEELINK_LIGHT_MONO5("yeelink.light.mono5", "Yeelight LED Filament Bulb", THING_TYPE_BASIC),
|
||||
|
||||
@@ -0,0 +1,280 @@
|
||||
{
|
||||
"deviceMapping": {
|
||||
"id": [
|
||||
"yeelink.light.lamp15"
|
||||
],
|
||||
"propertyMethod": "get_prop",
|
||||
"maxProperties": 2,
|
||||
"channels": [
|
||||
{
|
||||
"property": "power",
|
||||
"friendlyName": "Power",
|
||||
"channel": "power",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_power",
|
||||
"parameterType": "ONOFF"
|
||||
}
|
||||
],
|
||||
"category": "switch",
|
||||
"tags": [
|
||||
"Switch"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "bright",
|
||||
"friendlyName": "Brightness",
|
||||
"channel": "brightness",
|
||||
"type": "Dimmer",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_bright",
|
||||
"parameterType": "NUMBER",
|
||||
"condition": {
|
||||
"name": "BrightnessExisting"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "set_power",
|
||||
"parameterType": "ONOFF",
|
||||
"condition": {
|
||||
"name": "BrightnessOnOff"
|
||||
}
|
||||
}
|
||||
],
|
||||
"category": "light",
|
||||
"tags": [
|
||||
"Setpoint",
|
||||
"Light"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "delayoff",
|
||||
"friendlyName": "Shutdown Timer",
|
||||
"channel": "delayoff",
|
||||
"type": "Number:Time",
|
||||
"unit": "seconds",
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "cron_add",
|
||||
"parameterType": "NUMBER",
|
||||
"parameters": [
|
||||
0,
|
||||
"$value$"
|
||||
]
|
||||
}
|
||||
],
|
||||
"category": "time",
|
||||
"tags": [
|
||||
"Setpoint",
|
||||
"Duration"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "ct",
|
||||
"friendlyName": "Color Temperature",
|
||||
"channel": "colorTemperature",
|
||||
"type": "Number:Temperature",
|
||||
"unit": "kelvin",
|
||||
"stateDescription": {
|
||||
"minimum": 1700,
|
||||
"maximum": 6500,
|
||||
"step": 1,
|
||||
"pattern": "%.0f %unit%"
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_ct_abx",
|
||||
"parameterType": "NUMBER",
|
||||
"parameters": [
|
||||
"$value$",
|
||||
"smooth",
|
||||
500
|
||||
]
|
||||
}
|
||||
],
|
||||
"category": "colorlight",
|
||||
"tags": [
|
||||
"Setpoint",
|
||||
"Temperature"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "color_mode",
|
||||
"friendlyName": "Color Mode",
|
||||
"channel": "colorMode",
|
||||
"type": "Number",
|
||||
"stateDescription": {
|
||||
"minimum": 0,
|
||||
"maximum": 5,
|
||||
"step": 1,
|
||||
"options": [
|
||||
{
|
||||
"value": "0",
|
||||
"label": "Default"
|
||||
},
|
||||
{
|
||||
"value": "1",
|
||||
"label": "CT mode"
|
||||
},
|
||||
{
|
||||
"value": "2",
|
||||
"label": "RGB mode"
|
||||
},
|
||||
{
|
||||
"value": "3",
|
||||
"label": "HSV mode"
|
||||
},
|
||||
{
|
||||
"value": "4",
|
||||
"label": "Color Flow mode"
|
||||
},
|
||||
{
|
||||
"value": "5",
|
||||
"label": "Night Light mode"
|
||||
}
|
||||
]
|
||||
},
|
||||
"refresh": true,
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_power",
|
||||
"parameterType": "NUMBER",
|
||||
"parameters": [
|
||||
"on",
|
||||
"smooth",
|
||||
500,
|
||||
"$value$"
|
||||
]
|
||||
}
|
||||
],
|
||||
"category": "settings",
|
||||
"tags": [
|
||||
"Control",
|
||||
"Light"
|
||||
],
|
||||
"readmeComment": "Value mapping [\"0\"\u003d\"Default\",\"1\"\u003d\"CT mode\",\"2\"\u003d\"RGB mode\",\"3\"\u003d\"HSV mode\",\"4\"\u003d\"Color Flow mode\",\"5\"\u003d\"Night Light mode\"]"
|
||||
},
|
||||
{
|
||||
"property": "rgb",
|
||||
"friendlyName": "RGB Color",
|
||||
"channel": "rgbColor",
|
||||
"type": "Color",
|
||||
"refresh": true,
|
||||
"ChannelGroup": "actions",
|
||||
"actions": [
|
||||
{
|
||||
"command": "set_rgb",
|
||||
"parameterType": "COLOR",
|
||||
"parameters": [
|
||||
"$value$",
|
||||
"smooth",
|
||||
500
|
||||
],
|
||||
"condition": {
|
||||
"name": "HSBOnly"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "set_bright",
|
||||
"parameterType": "NUMBER",
|
||||
"condition": {
|
||||
"name": "BrightnessExisting"
|
||||
}
|
||||
},
|
||||
{
|
||||
"command": "set_power",
|
||||
"parameterType": "ONOFF",
|
||||
"condition": {
|
||||
"name": "BrightnessOnOff"
|
||||
}
|
||||
}
|
||||
],
|
||||
"category": "colorpicker",
|
||||
"tags": [
|
||||
"Control",
|
||||
"Light"
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "bg_bright",
|
||||
"friendlyName": "Ambient Brightness",
|
||||
"channel": "ambientBrightness",
|
||||
"channelType": "ambientBrightness",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"ChannelGroup": "actions",
|
||||
"actions": [
|
||||
{
|
||||
"command": "bg_set_bright",
|
||||
"parameterType": "NUMBER"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "bg_power",
|
||||
"friendlyName": "Ambient Power",
|
||||
"channel": "ambientPower",
|
||||
"channelType": "ambientPower",
|
||||
"type": "Switch",
|
||||
"refresh": true,
|
||||
"ChannelGroup": "actions",
|
||||
"actions": [
|
||||
{
|
||||
"command": "bg_set_power",
|
||||
"parameterType": "ONOFF"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "bg_rgb",
|
||||
"friendlyName": "Ambient Color",
|
||||
"channel": "ambientColor",
|
||||
"channelType": "ambientColor",
|
||||
"type": "Color",
|
||||
"refresh": true,
|
||||
"ChannelGroup": "actions",
|
||||
"actions": [
|
||||
{
|
||||
"command": "bg_set_rgb",
|
||||
"parameterType": "COLOR"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "bg_ct",
|
||||
"friendlyName": "Ambient Color Temperature",
|
||||
"channel": "ambientColorTemperature",
|
||||
"channelType": "ambientColorTemperature",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"ChannelGroup": "actions",
|
||||
"actions": [
|
||||
{
|
||||
"command": "bg_set_ct_abx",
|
||||
"parameterType": "NUMBER",
|
||||
"parameters": [
|
||||
"$value$",
|
||||
"smooth",
|
||||
500
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"property": "bg_lmode",
|
||||
"friendlyName": "Ambient Color Mode",
|
||||
"channel": "ambientColorMode",
|
||||
"channelType": "ambientColorMode",
|
||||
"type": "Number",
|
||||
"refresh": true,
|
||||
"actions": []
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user