[miio] add several Philips lights (#8736)

Add following models:
philips.light.sread2
philips.light.cbulb
philips.light.cbulbs
philips.light.dcolor
philips.light.rwread

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel
2020-10-12 03:18:43 +02:00
committed by GitHub
parent 343981fc12
commit 2913018e4a
5 changed files with 385 additions and 2 deletions

View File

@@ -88,7 +88,8 @@ public enum MiIoDevices {
HUMIDIFIER("zhimi.humidifier.v1", "Mi Humdifier", THING_TYPE_BASIC),
LUMI_C11("lumi.ctrl_neutral1.v1", "Light Control (Wall Switch)", THING_TYPE_UNSUPPORTED),
LUMI_C12("lumi.ctrl_neutral2.v1", "Light Control (Wall Switch)", THING_TYPE_UNSUPPORTED),
PHILIPS_R1("philips.light.sread1", "Xiaomi Philips Eyecare Smart Lamp 2", THING_TYPE_BASIC),
PHILIPS_SR1("philips.light.sread1", "Xiaomi Philips Eyecare Smart Lamp 2", THING_TYPE_BASIC),
PHILIPS_SR2("philips.light.sread2", "Xiaomi Philips Eyecare Smart Lamp 2", THING_TYPE_BASIC),
PHILIPS_C("philips.light.ceiling", "Xiaomi Philips LED Ceiling Lamp", THING_TYPE_BASIC),
PHILIPS_C2("philips.light.zyceiling", "Xiaomi Philips LED Ceiling Lamp", THING_TYPE_BASIC),
PHILIPS_BULB("philips.light.bulb", "Xiaomi Philips Bulb", THING_TYPE_BASIC),
@@ -98,6 +99,10 @@ public enum MiIoDevices {
PHILIPS_MOON("philips.light.moonlight", "Xiaomi Philips ZhiRui bedside lamp", THING_TYPE_BASIC),
PHILIPS_LIGHT_BCEILING1("philips.light.bceiling1", "Philips Ceiling Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_BCEILING2("philips.light.bceiling2", "Philips Ceiling Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_CBULB("philips.light.cbulb", "Philips Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_CBULBS("philips.light.cbulbs", "Philips Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_DCOLOR("philips.light.dcolor", "Philips Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_RWREAD("philips.light.rwread", "Philips Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_LNBLIGHT1("philips.light.lnblight1", "Philips Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_LNBLIGHT2("philips.light.lnblight2", "Philips Light", THING_TYPE_BASIC),
PHILIPS_LIGHT_LNLRLIGHT("philips.light.lnlrlight", "Philips Light", THING_TYPE_BASIC),

View File

@@ -0,0 +1,133 @@
{
"deviceMapping": {
"id": [
"philips.light.cbulb",
"philips.light.cbulbs",
"philips.light.dcolor"
],
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
"parameterType": "NUMBER",
"condition": {
"name": "BrightnessExisting"
}
},
{
"command": "set_power",
"parameterType": "ONOFF",
"condition": {
"name": "BrightnessOnOff"
}
}
]
},
{
"property": "cct",
"friendlyName": "Correlated Color Temperature",
"channel": "cct",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_cct",
"parameterType": "NUMBER"
}
]
},
{
"property": "snm",
"friendlyName": "Scene",
"channel": "scene",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "apply_scene",
"parameterType": "NUMBER"
}
]
},
{
"property": "cid",
"friendlyName": "Color",
"channel": "cid",
"type": "Color",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_cid",
"parameterType": "COLOR"
}
]
},
{
"property": "",
"friendlyName": "Switch Scene",
"channel": "switchscene",
"type": "Switch",
"refresh": false,
"ChannelGroup": "actions",
"actions": [
{
"command": "switch_the_scene",
"parameterType": "EMPTY"
}
]
},
{
"property": "get_switch_en",
"friendlyName": "Switch Enabled",
"channel": "switch_en",
"type": "Switch",
"refresh": false,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_switch_en",
"parameterType": "NUMBER"
}
]
},
{
"property": "",
"friendlyName": "Delay Off",
"channel": "delayoff",
"type": "Switch",
"refresh": false,
"ChannelGroup": "actions",
"actions": [
{
"command": "delay_off",
"parameterType": "NUMBER"
}
]
}
]
}
}

View File

@@ -0,0 +1,87 @@
{
"deviceMapping": {
"id": [
"philips.light.rwread"
],
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
"parameterType": "NUMBER",
"condition": {
"name": "BrightnessExisting"
}
},
{
"command": "set_power",
"parameterType": "ONOFF",
"condition": {
"name": "BrightnessOnOff"
}
}
]
},
{
"property": "snm",
"friendlyName": "Scene",
"channel": "scene",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "apply_scene",
"parameterType": "NUMBER"
}
]
},
{
"property": "flm",
"friendlyName": "Follow Me",
"channel": "flm",
"type": "Number",
"refresh": true,
"actions": [
{
"command": "set_flmvalue",
"parameterType": "NUMBER"
}
]
},
{
"property": "dv",
"friendlyName": "DV",
"channel": "dv",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"parameterType": "EMPTY"
}
]
}
]
}
}

View File

@@ -1,7 +1,8 @@
{
"deviceMapping": {
"id": [
"philips.light.sread1"
"philips.light.sread1",
"philips.light.sread2"
],
"channels": [
{
@@ -92,6 +93,19 @@
"parameterType": "ONOFF"
}
]
},
{
"property": "bl",
"friendlyName": "Night Light",
"channel": "bl",
"type": "Switch",
"refresh": true,
"actions": [
{
"command": "enable_bl",
"parameterType": "NUMBER"
}
]
}
]
}