From 3dfca54aa5581d08d34da41c88f08d74b9566e13 Mon Sep 17 00:00:00 2001 From: Matt Schmitt Date: Tue, 15 May 2018 20:44:01 -0400 Subject: [PATCH 1/5] Add support for media players --- source/_components/homekit.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/_components/homekit.markdown b/source/_components/homekit.markdown index 162ac3b10b9b..b5b1f0fb655f 100644 --- a/source/_components/homekit.markdown +++ b/source/_components/homekit.markdown @@ -95,6 +95,11 @@ homekit: required: false type: string default: '' + mode: + description: Operation mode of switch within HomeKit. Valid modes are `on_off`, `play_pause`, `play_stop`, and `toggle_mute`. If the entity does not support the specified `mode`, the first supported `mode` will be used. Only applicable for `media_player` entities. + required: false + type: string + default: Depends on `supported_features` of entity. {% endconfiguration %}

@@ -229,6 +234,7 @@ The following components are currently supported: | fan | Fan | Support for `on / off`, `direction` and `oscillating`. | | light | Light | Support for `on / off`, `brightness` and `rgb_color`. | | lock | DoorLock | Support for `lock / unlock`. | +| media_player | MediaPlayer | Represented as a switch which controls `on / off`, `play / pause`, `play / stop`, or `mute` depending on `supported_features` of entity and the `mode` specified in `entity_config`. | | sensor | TemperatureSensor | All sensors that have `Celsius` or `Fahrenheit` as their `unit_of_measurement` or `temperature` as their `device_class`. | | sensor | HumiditySensor | All sensors that have `%` as their `unit_of_measurement` and `humidity` as their `device_class`. | | sensor | AirQualitySensor | All sensors that have `pm25` as part of their `entity_id` or `pm25` as their `device_class` | From b3ab6fa57e0087897b5b2e497d5f128d2302203c Mon Sep 17 00:00:00 2001 From: Matt Schmitt Date: Sun, 20 May 2018 14:31:46 -0400 Subject: [PATCH 2/5] Update to allow multiple modes per entity --- source/_components/homekit.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_components/homekit.markdown b/source/_components/homekit.markdown index b5b1f0fb655f..7a3bb3a9b210 100644 --- a/source/_components/homekit.markdown +++ b/source/_components/homekit.markdown @@ -96,10 +96,10 @@ homekit: type: string default: '' mode: - description: Operation mode of switch within HomeKit. Valid modes are `on_off`, `play_pause`, `play_stop`, and `toggle_mute`. If the entity does not support the specified `mode`, the first supported `mode` will be used. Only applicable for `media_player` entities. + description: Operation mode of switches within HomeKit. Valid modes are `on_off`, `play_pause`, `play_stop`, and `toggle_mute`. The entity will ignore any `mode` which is not supported. If not specified, all supported modes will be added. Only applicable for `media_player` entities. required: false - type: string - default: Depends on `supported_features` of entity. + type: list + default: `on_off`, `play_pause`, `play_stop`, `toggle_mute` {% endconfiguration %}

@@ -234,7 +234,7 @@ The following components are currently supported: | fan | Fan | Support for `on / off`, `direction` and `oscillating`. | | light | Light | Support for `on / off`, `brightness` and `rgb_color`. | | lock | DoorLock | Support for `lock / unlock`. | -| media_player | MediaPlayer | Represented as a switch which controls `on / off`, `play / pause`, `play / stop`, or `mute` depending on `supported_features` of entity and the `mode` specified in `entity_config`. | +| media_player | MediaPlayer | Represented as a series of switches which control `on / off`, `play / pause`, `play / stop`, or `mute` depending on `supported_features` of entity and the `mode` list specified in `entity_config`. | | sensor | TemperatureSensor | All sensors that have `Celsius` or `Fahrenheit` as their `unit_of_measurement` or `temperature` as their `device_class`. | | sensor | HumiditySensor | All sensors that have `%` as their `unit_of_measurement` and `humidity` as their `device_class`. | | sensor | AirQualitySensor | All sensors that have `pm25` as part of their `entity_id` or `pm25` as their `device_class` | From e20ecdcad0b481bb6dfbbfdda9604ddaf69e482f Mon Sep 17 00:00:00 2001 From: Matt Schmitt Date: Sun, 20 May 2018 14:36:03 -0400 Subject: [PATCH 3/5] Update sample config --- source/_components/homekit.markdown | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source/_components/homekit.markdown b/source/_components/homekit.markdown index 7a3bb3a9b210..4d3db69a0320 100644 --- a/source/_components/homekit.markdown +++ b/source/_components/homekit.markdown @@ -30,9 +30,16 @@ homekit: include_domains: - alarm_control_panel - light + - media_player entity_config: alarm_control_panel.home: code: 1234 + media_player.living_room: + mode: + - on_off + - play_pause + - play_stop + - toggle_mute ``` {% configuration %} From 12b17b2c4ca807b145c7f22189fd1cd5531bfae2 Mon Sep 17 00:00:00 2001 From: Matt Schmitt Date: Mon, 21 May 2018 23:12:52 -0400 Subject: [PATCH 4/5] Grammar update --- source/_components/homekit.markdown | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/_components/homekit.markdown b/source/_components/homekit.markdown index 4d3db69a0320..2f50fce5d498 100644 --- a/source/_components/homekit.markdown +++ b/source/_components/homekit.markdown @@ -52,12 +52,12 @@ homekit: description: Flag if the HomeKit Server should start automatically after the Home Assistant Core Setup is done. ([Disable Auto Start](#disable-auto-start)) required: false type: boolean - default: true + default: `true` port: description: Port for the HomeKit extension. required: false type: int - default: 51827 + default: `51827` ip_address: description: The local network IP address. Only necessary if the default from Home Assistant does not work. required: false @@ -103,10 +103,10 @@ homekit: type: string default: '' mode: - description: Operation mode of switches within HomeKit. Valid modes are `on_off`, `play_pause`, `play_stop`, and `toggle_mute`. The entity will ignore any `mode` which is not supported. If not specified, all supported modes will be added. Only applicable for `media_player` entities. + description: Operation modes of switches within HomeKit. Valid modes are `on_off`, `play_pause`, `play_stop`, and `toggle_mute`. Only applicable for `media_player` entities. required: false type: list - default: `on_off`, `play_pause`, `play_stop`, `toggle_mute` + default: All supported modes {% endconfiguration %}

From d843afd0b002665b45ab9b5a81fc6bebeef1a465 Mon Sep 17 00:00:00 2001 From: cdce8p <30130371+cdce8p@users.noreply.github.com> Date: Tue, 22 May 2018 12:10:29 +0200 Subject: [PATCH 5/5] Last changes --- source/_components/homekit.markdown | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/_components/homekit.markdown b/source/_components/homekit.markdown index 2f50fce5d498..0d306231ccb0 100644 --- a/source/_components/homekit.markdown +++ b/source/_components/homekit.markdown @@ -52,12 +52,12 @@ homekit: description: Flag if the HomeKit Server should start automatically after the Home Assistant Core Setup is done. ([Disable Auto Start](#disable-auto-start)) required: false type: boolean - default: `true` + default: true port: description: Port for the HomeKit extension. required: false type: int - default: `51827` + default: 51827 ip_address: description: The local network IP address. Only necessary if the default from Home Assistant does not work. required: false @@ -106,7 +106,7 @@ homekit: description: Operation modes of switches within HomeKit. Valid modes are `on_off`, `play_pause`, `play_stop`, and `toggle_mute`. Only applicable for `media_player` entities. required: false type: list - default: All supported modes + default: '``' {% endconfiguration %}