update doc for keyboard_remote type (#19513)

This commit is contained in:
Ian Foster 2021-09-30 00:50:52 -07:00 committed by GitHub
parent c71ff3a065
commit b48ba73213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,6 +7,7 @@ ha_release: 0.29
ha_iot_class: Local Push
ha_codeowners:
- '@bendavid'
- '@lanrat'
ha_domain: keyboard_remote
---
@ -91,6 +92,8 @@ automation:
event_data:
device_descriptor: "/dev/input/event0"
key_code: 107 # inspect log to obtain desired keycode
type: key_down # only trigger on key_down events (optional)
action:
service: light.turn_on
target:
@ -99,6 +102,9 @@ automation:
`device_descriptor` or `device_name` may be specified in the trigger so the automation will be fired only for that keyboard. This is especially useful if you wish to use several Bluetooth remotes to control different devices. Omit them to ensure the same key triggers the automation for all keyboards/remotes.
`key_code` should be set to the code generated by the key press, otherwise the trigger will file on every key press.
`type` can optionally be set to one of `key_down`, `key_up`, or `key_hold` to limit the trigger to that specific event type.
## Disconnections
This integration manages disconnections and re-connections of the keyboard, for example in the case of a Bluetooth device that turns off automatically to preserve battery.