From b48ba73213bb1a4e0a801a5884e4e42cc2cd698f Mon Sep 17 00:00:00 2001 From: Ian Foster Date: Thu, 30 Sep 2021 00:50:52 -0700 Subject: [PATCH] update doc for keyboard_remote type (#19513) --- source/_integrations/keyboard_remote.markdown | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/_integrations/keyboard_remote.markdown b/source/_integrations/keyboard_remote.markdown index 49a193f1b26..7db0b3aa9f3 100644 --- a/source/_integrations/keyboard_remote.markdown +++ b/source/_integrations/keyboard_remote.markdown @@ -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.