home-assistant.io/source/_components/keyboard_remote.markdown
2016-09-28 21:19:23 -07:00

1.2 KiB
Raw Blame History

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page Keyboard Instructions how to use a keyboard to remote control Home Assistant. 2016-09-28 14:39 true false true true keyboard.png Other 0.29 Local Push

Recieve signals from a keyboard and use it as a remote control.

This component allows to use a keyboard as remote control. It will fire ´keyboard_remote_command_received´ events witch can then be used in automation rules.

The evdev package is used to interface with the keyboard and thus this is Linux only. It also means you can't use your normal keyboard for this, because evdev will block it.

# Example configuration.yaml entry
keyboard_remote:
  device_descriptor: '/dev/input/by-id/foo'
  key_value: 'key_up' # optional alternaive 'key_down' and 'key_hold'
  # be carefull, 'key_hold' fires a lot of events

And an automation rule to bring breath live into it.

automation:
  alias: Keyboard All light on
  trigger:
    platform: event
    event_type: keyboard_remote_command_received
    event_data:
      key_code: 107 # inspect log to obtain desired keycode
  action:
    service: light.turn_on
    entity_id: light.all