Update description for Disable Auto Start in Homekit (#16416)

This commit is contained in:
Gerard 2021-02-05 11:43:29 +01:00 committed by GitHub
parent b261f12c70
commit 8041407e87
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -313,81 +313,7 @@ When exposing a Television media player (a `media_player` with device class `tv`
## Disable Auto Start
Depending on your setup, it might be necessary to disable `Auto Start` for all accessories to be available for `HomeKit`. Only those entities that are fully set up when the `HomeKit` integration is started, can be added. To start `HomeKit` when `auto_start: false`, you can call the service `homekit.start`.
If you have Z-Wave entities you want to be exposed to HomeKit, then you'll need to disable auto start and then start it after the Z-Wave mesh is ready. This is because the Z-Wave entities won't be fully set up until then. This can be automated using an automation.
<div class='note'>
Please remember that you can only have a single `automation` entry. Add the automation to your existing automations.
</div>
```yaml
# Example for Z-Wave
homekit:
auto_start: false
automation:
- alias: 'Start HomeKit'
trigger:
- platform: event
event_type: zwave.network_ready
- platform: event
event_type: zwave.network_complete
- platform: event
event_type: zwave.network_complete_some_dead
action:
- service: homekit.start
```
For a general delay where your integration doesn't generate an event, you can also do:
```yaml
# Example using a delay after the start of Home Assistant
homekit:
auto_start: false
automation:
- alias: 'Start HomeKit'
trigger:
- platform: homeassistant
event: start
action:
- delay: 00:05 # Waits 5 minutes
- service: homekit.start
```
In some cases it might be desirable to check that all entities are available before starting `HomeKit`. This can be accomplished by adding an additional `binary_sensor` as follows:
{% raw %}
```yaml
# Example checking specific entities to be available before start
homekit:
auto_start: false
automation:
- alias: 'Start HomeKit'
trigger:
- platform: homeassistant
event: start
action:
- wait_template: >-
{% if not states.light.kitchen_lights %}
false
{% elif not states.sensor.outside_temperature %}
false
# Repeat for every entity
{% else %}
true
{% endif %}
timeout: 00:15 # Waits 15 minutes
continue_on_timeout: false
- service: homekit.start
```
{% endraw %}
It is not needed (anymore) to disable `Auto Start` for all accessories to be available for `HomeKit` as Home Assistant restores all entities on start instantly.
## Configure Filter