[miio] improve yeelight json (#9338)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel 2020-12-12 11:58:18 -08:00 committed by GitHub
parent ff40b5a632
commit 6b3490fc57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 622 additions and 354 deletions

File diff suppressed because it is too large Load Diff

View File

@ -132,8 +132,8 @@
"piid": 1,
"friendlyName": "Battery-Battery Level",
"channel": "BatteryLevel",
"type": "Number",
"channelType": "system:battery-level",
"type": "Number",
"refresh": true,
"actions": []
},

View File

@ -72,8 +72,8 @@
"piid": 1,
"friendlyName": "Battery - Battery Level",
"channel": "battery-level",
"type": "Number",
"channelType": "system:battery-level",
"type": "Number",
"stateDescription": {
"pattern": "%.0f %%",
"readOnly": true

View File

@ -9,15 +9,17 @@
"property": "power",
"friendlyName": "Power",
"channel": "power",
"channelType": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
@ -38,10 +40,8 @@
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"channelType": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
@ -57,16 +57,20 @@
"name": "BrightnessOnOff"
}
}
],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
},
{
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"channelType": "delayoff",
"type": "Number",
"type": "Number:Time",
"unit": "seconds",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
@ -76,17 +80,20 @@
"$value$"
]
}
],
"category": "time",
"tags": [
"Setpoint",
"Duration"
]
},
{
"property": "temperature",
"friendlyName": "Temperature",
"channel": "temperature",
"channelType": "temperatureC",
"type": "Number:Temperature",
"unit": "CELCIUS",
"refresh": true,
"ChannelGroup": "",
"actions": [],
"category": "temperature",
"tags": [
@ -101,8 +108,12 @@
"channelType": "nightlightBrightness",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
"actions": [],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
}
]
}

View File

@ -34,25 +34,25 @@
"property": "power",
"friendlyName": "Power",
"channel": "power",
"channelType": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"channelType": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
@ -68,16 +68,20 @@
"name": "BrightnessOnOff"
}
}
],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
},
{
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"channelType": "delayoff",
"type": "Number",
"type": "Number:Time",
"unit": "seconds",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
@ -87,16 +91,26 @@
"$value$"
]
}
],
"category": "time",
"tags": [
"Setpoint",
"Duration"
]
},
{
"property": "ct",
"friendlyName": "Color Temperature",
"channel": "colorTemperature",
"channelType": "colorTemperature",
"type": "Number",
"type": "Number:Temperature",
"unit": "kelvin",
"stateDescription": {
"minimum": 2700,
"maximum": 6500,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_ct_abx",
@ -107,14 +121,49 @@
500
]
}
],
"category": "colorlight",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "color_mode",
"friendlyName": "Color Mode",
"channel": "colorMode",
"channelType": "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,
"ChannelGroup": "",
"actions": []
@ -131,7 +180,8 @@
"command": "set_name",
"parameterType": "STRING"
}
]
],
"category": "text"
},
{
"property": "",
@ -155,8 +205,12 @@
"channelType": "nightlightBrightness",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
"actions": [],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
}
]
}

View File

@ -9,25 +9,25 @@
"property": "power",
"friendlyName": "Power",
"channel": "power",
"channelType": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"channelType": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
@ -43,16 +43,20 @@
"name": "BrightnessOnOff"
}
}
],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
},
{
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"channelType": "delayoff",
"type": "Number",
"type": "Number:Time",
"unit": "seconds",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
@ -62,16 +66,26 @@
"$value$"
]
}
],
"category": "time",
"tags": [
"Setpoint",
"Duration"
]
},
{
"property": "ct",
"friendlyName": "Color Temperature",
"channel": "colorTemperature",
"channelType": "colorTemperature",
"type": "Number",
"type": "Number:Temperature",
"unit": "kelvin",
"stateDescription": {
"minimum": 2700,
"maximum": 6500,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_ct_abx",
@ -82,14 +96,49 @@
500
]
}
],
"category": "colorlight",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "color_mode",
"friendlyName": "Color Mode",
"channel": "colorMode",
"channelType": "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,
"ChannelGroup": "",
"actions": []
@ -106,7 +155,8 @@
"command": "set_name",
"parameterType": "STRING"
}
]
],
"category": "text"
},
{
"property": "",
@ -130,8 +180,12 @@
"channelType": "nightlightBrightness",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
"actions": [],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
}
]
}

View File

@ -10,25 +10,25 @@
"property": "power",
"friendlyName": "Power",
"channel": "power",
"channelType": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"channelType": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
@ -44,6 +44,11 @@
"name": "BrightnessOnOff"
}
}
],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
},
{
@ -65,10 +70,9 @@
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"channelType": "delayoff",
"type": "Number",
"type": "Number:Time",
"unit": "seconds",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
@ -78,16 +82,26 @@
"$value$"
]
}
],
"category": "time",
"tags": [
"Setpoint",
"Duration"
]
},
{
"property": "ct",
"friendlyName": "Color Temperature",
"channel": "colorTemperature",
"channelType": "colorTemperature",
"type": "Number",
"type": "Number:Temperature",
"unit": "kelvin",
"stateDescription": {
"minimum": 2700,
"maximum": 6500,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_ct_abx",
@ -98,14 +112,49 @@
500
]
}
],
"category": "colorlight",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "color_mode",
"friendlyName": "Color Mode",
"channel": "colorMode",
"channelType": "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,
"ChannelGroup": "",
"actions": []
@ -122,7 +171,8 @@
"command": "set_name",
"parameterType": "STRING"
}
]
],
"category": "text"
},
{
"property": "bg_power",
@ -196,7 +246,6 @@
"channelType": "ambientColorMode",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
},
{
@ -206,8 +255,12 @@
"channelType": "nightlightBrightness",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
"actions": [],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
}
]
}

View File

@ -17,25 +17,25 @@
"property": "power",
"friendlyName": "Power",
"channel": "power",
"channelType": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"channelType": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
@ -51,16 +51,20 @@
"name": "BrightnessOnOff"
}
}
],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
},
{
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"channelType": "delayoff",
"type": "Number",
"type": "Number:Time",
"unit": "seconds",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
@ -70,16 +74,26 @@
"$value$"
]
}
],
"category": "time",
"tags": [
"Setpoint",
"Duration"
]
},
{
"property": "ct",
"friendlyName": "Color Temperature",
"channel": "colorTemperature",
"channelType": "colorTemperature",
"type": "Number",
"type": "Number:Temperature",
"unit": "kelvin",
"stateDescription": {
"minimum": 1700,
"maximum": 6500,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_ct_abx",
@ -90,30 +104,66 @@
500
]
}
],
"category": "colorlight",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "color_mode",
"friendlyName": "Color Mode",
"channel": "colorMode",
"channelType": "colorMode",
"type": "String",
"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,
"ChannelGroup": "actions",
"actions": []
},
{
"property": "toggle",
"friendlyName": "toggle",
"channel": "toggle",
"type": "Switch",
"refresh": false,
"ChannelGroup": "actions",
"actions": [
{
"command": "toggle",
"parameterType": "EMPTY"
"command": "set_power",
"parameterType": "NUMBER",
"parameters": [
"on",
"smooth",
500,
"$value$"
]
}
],
"category": "settings",
"tags": [
"Control",
"Light"
]
},
{
@ -150,6 +200,11 @@
"name": "BrightnessOnOff"
}
}
],
"category": "colorpicker",
"tags": [
"Control",
"Light"
]
},
{
@ -158,13 +213,13 @@
"channel": "name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_name",
"parameterType": "STRING"
}
]
],
"category": "text"
}
]
}

View File

@ -22,25 +22,25 @@
"property": "power",
"friendlyName": "Power",
"channel": "power",
"channelType": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
],
"category": "switch",
"tags": [
"Switch"
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"channelType": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
@ -56,16 +56,20 @@
"name": "BrightnessOnOff"
}
}
],
"category": "light",
"tags": [
"Setpoint",
"Light"
]
},
{
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"channelType": "delayoff",
"type": "Number",
"type": "Number:Time",
"unit": "seconds",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
@ -75,16 +79,26 @@
"$value$"
]
}
],
"category": "time",
"tags": [
"Setpoint",
"Duration"
]
},
{
"property": "ct",
"friendlyName": "Color Temperature",
"channel": "colorTemperature",
"channelType": "colorTemperature",
"type": "Number",
"type": "Number:Temperature",
"unit": "kelvin",
"stateDescription": {
"minimum": 2700,
"maximum": 6500,
"step": 1,
"pattern": "%.0f %unit%"
},
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_ct_abx",
@ -95,21 +109,66 @@
500
]
}
],
"category": "colorlight",
"tags": [
"Setpoint",
"Temperature"
]
},
{
"property": "color_mode",
"friendlyName": "Color Mode",
"channel": "colorMode",
"channelType": "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,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_scene",
"parameterType": "NUMBER"
"command": "set_power",
"parameterType": "NUMBER",
"parameters": [
"on",
"smooth",
500,
"$value$"
]
}
],
"category": "settings",
"tags": [
"Control",
"Light"
]
},
{
@ -118,13 +177,13 @@
"channel": "name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_name",
"parameterType": "STRING"
}
]
],
"category": "text"
}
]
}