mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-24 09:46:59 +00:00
update doc for keyboard_remote type (#19513)
This commit is contained in:
parent
c71ff3a065
commit
b48ba73213
@ -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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user