From d799127e30f0c89cfddd7763f70fa9d191dd473f Mon Sep 17 00:00:00 2001 From: Sebastian Muszynski Date: Fri, 9 Mar 2018 19:05:29 +0100 Subject: [PATCH] Xiaomi MiIO Light: Flag the device as unavailable if not reachable (#4699) * Configuration key "model" and "xiaomi_miio_set_delayed_turn_off" service added. * Service parameter renamed. * New device model (philips.light.zyceiling) added. * Service parameter updated. * Format of the services updated. Configuration schema added. * Missing supported device added. --- source/_components/light.xiaomi_miio.markdown | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/source/_components/light.xiaomi_miio.markdown b/source/_components/light.xiaomi_miio.markdown index b1428017a5e..3af241a04e9 100644 --- a/source/_components/light.xiaomi_miio.markdown +++ b/source/_components/light.xiaomi_miio.markdown @@ -13,7 +13,7 @@ ha_version: 0.53 ha_iot_class: "Local Polling" --- -The `xiaomi_miio` platform allows you to control the state of your Xiaomi Philips LED Ball Lamp and Xiaomi Philips LED Ceiling Lamp. +The `xiaomi_miio` platform allows you to control the state of your Xiaomi Philips LED Ball Lamp, Xiaomi Philips LED Ceiling Lamp and Xiaomi Philips Eyecare Lamp 2. Currently, the supported features are `on`, `off`, `set_cct` (colortemp) , `set_bright` (brightness). @@ -28,12 +28,34 @@ light: name: Xiaomi Philips Smart LED Ball host: 192.168.130.67 token: YOUR_TOKEN + model: philips.light.bulb ``` Configuration variables: - **host** (*Required*): The IP of your light. - **token** (*Required*): The API token of your light. - **name** (*Optional*): The name of your light. +- **model** (*Optional*): The model of your light. Valid values are `philips.light.bulb`, `philips.light.sread1`, `philips.light.ceiling` and `philips.light.zyceiling`. This setting can be used to bypass the device model detection and is recommended if your device isn't always available. + +{% configuration %} +host: + description: The IP address of your device. + required: true + type: string +token: + description: The API token of your device. + required: true + type: string +name: + description: The name of your device. + required: false + type: string + default: Xiaomi Philips Light +model: + description: The model of your device. + required: false + type: string +{% endconfiguration %} ## {% linkable_title Platform Services %} @@ -43,5 +65,14 @@ Set one of the 4 available fixed scenes. | Service data attribute | Optional | Description | |---------------------------|----------|-------------------------------------------------------| -| `entity_id` | yes | Only act on specific light. Else targets all. | +| `entity_id` | yes | Only act on a specific light. Else targets all. | | `scene` | no | Scene, between 1 and 4. | + +### {% linkable_title Service `light.xiaomi_miio_set_delayed_turn_off` %} + +Delayed turn off. + +| Service data attribute | Optional | Description | +|---------------------------|----------|-------------------------------------------------------| +| `entity_id` | yes | Only act on a specific light. Else targets all. | +| `time_period` | no | Time period for the delayed turn off. |