Home Assistant Unofficial Reference 2024.12.1
homeassistant.components.keyboard_remote Namespace Reference

Classes

class  KeyboardRemote
 

Functions

bool async_setup (HomeAssistant hass, ConfigType config)
 

Variables

 _LOGGER = logging.getLogger(__name__)
 
 CONFIG_SCHEMA
 
string DEVICE_DESCRIPTOR = "device_descriptor"
 
string DEVICE_ID_GROUP = "Device description"
 
string DEVICE_NAME = "device_name"
 
string DEVINPUT = "/dev/input"
 
string DOMAIN = "keyboard_remote"
 
string EMULATE_KEY_HOLD = "emulate_key_hold"
 
string EMULATE_KEY_HOLD_DELAY = "emulate_key_hold_delay"
 
string EMULATE_KEY_HOLD_REPEAT = "emulate_key_hold_repeat"
 
string ICON = "mdi:remote"
 
string KEY_CODE = "key_code"
 
dictionary KEY_VALUE = {"key_up": 0, "key_down": 1, "key_hold": 2}
 
dictionary KEY_VALUE_NAME = {value: key for key, value in KEY_VALUE.items()}
 
string KEYBOARD_REMOTE_COMMAND_RECEIVED = "keyboard_remote_command_received"
 
string KEYBOARD_REMOTE_CONNECTED = "keyboard_remote_connected"
 
string KEYBOARD_REMOTE_DISCONNECTED = "keyboard_remote_disconnected"
 
string TYPE = "type"
 

Detailed Description

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

Function Documentation

◆ async_setup()

bool homeassistant.components.keyboard_remote.async_setup ( HomeAssistant  hass,
ConfigType  config 
)
Set up the keyboard_remote.

Definition at line 68 of file __init__.py.

Variable Documentation

◆ _LOGGER

homeassistant.components.keyboard_remote._LOGGER = logging.getLogger(__name__)
private

Definition at line 20 of file __init__.py.

◆ CONFIG_SCHEMA

homeassistant.components.keyboard_remote.CONFIG_SCHEMA
Initial value:
1 = vol.Schema(
2  {
3  DOMAIN: vol.All(
4  cv.ensure_list,
5  [
6  vol.Schema(
7  {
8  vol.Exclusive(DEVICE_DESCRIPTOR, DEVICE_ID_GROUP): cv.string,
9  vol.Exclusive(DEVICE_NAME, DEVICE_ID_GROUP): cv.string,
10  vol.Optional(TYPE, default=["key_up"]): vol.All(
11  cv.ensure_list, [vol.In(KEY_VALUE)]
12  ),
13  vol.Optional(EMULATE_KEY_HOLD, default=False): cv.boolean,
14  vol.Optional(EMULATE_KEY_HOLD_DELAY, default=0.250): float,
15  vol.Optional(EMULATE_KEY_HOLD_REPEAT, default=0.033): float,
16  }
17  ),
18  cv.has_at_least_one_key(DEVICE_DESCRIPTOR, DEVICE_ID_GROUP),
19  ],
20  )
21  },
22  extra=vol.ALLOW_EXTRA,
23 )

Definition at line 43 of file __init__.py.

◆ DEVICE_DESCRIPTOR

string homeassistant.components.keyboard_remote.DEVICE_DESCRIPTOR = "device_descriptor"

Definition at line 22 of file __init__.py.

◆ DEVICE_ID_GROUP

string homeassistant.components.keyboard_remote.DEVICE_ID_GROUP = "Device description"

Definition at line 23 of file __init__.py.

◆ DEVICE_NAME

string homeassistant.components.keyboard_remote.DEVICE_NAME = "device_name"

Definition at line 24 of file __init__.py.

◆ DEVINPUT

string homeassistant.components.keyboard_remote.DEVINPUT = "/dev/input"

Definition at line 41 of file __init__.py.

◆ DOMAIN

string homeassistant.components.keyboard_remote.DOMAIN = "keyboard_remote"

Definition at line 25 of file __init__.py.

◆ EMULATE_KEY_HOLD

string homeassistant.components.keyboard_remote.EMULATE_KEY_HOLD = "emulate_key_hold"

Definition at line 37 of file __init__.py.

◆ EMULATE_KEY_HOLD_DELAY

string homeassistant.components.keyboard_remote.EMULATE_KEY_HOLD_DELAY = "emulate_key_hold_delay"

Definition at line 38 of file __init__.py.

◆ EMULATE_KEY_HOLD_REPEAT

string homeassistant.components.keyboard_remote.EMULATE_KEY_HOLD_REPEAT = "emulate_key_hold_repeat"

Definition at line 39 of file __init__.py.

◆ ICON

string homeassistant.components.keyboard_remote.ICON = "mdi:remote"

Definition at line 27 of file __init__.py.

◆ KEY_CODE

string homeassistant.components.keyboard_remote.KEY_CODE = "key_code"

Definition at line 29 of file __init__.py.

◆ KEY_VALUE

dictionary homeassistant.components.keyboard_remote.KEY_VALUE = {"key_up": 0, "key_down": 1, "key_hold": 2}

Definition at line 30 of file __init__.py.

◆ KEY_VALUE_NAME

dictionary homeassistant.components.keyboard_remote.KEY_VALUE_NAME = {value: key for key, value in KEY_VALUE.items()}

Definition at line 31 of file __init__.py.

◆ KEYBOARD_REMOTE_COMMAND_RECEIVED

string homeassistant.components.keyboard_remote.KEYBOARD_REMOTE_COMMAND_RECEIVED = "keyboard_remote_command_received"

Definition at line 32 of file __init__.py.

◆ KEYBOARD_REMOTE_CONNECTED

string homeassistant.components.keyboard_remote.KEYBOARD_REMOTE_CONNECTED = "keyboard_remote_connected"

Definition at line 33 of file __init__.py.

◆ KEYBOARD_REMOTE_DISCONNECTED

string homeassistant.components.keyboard_remote.KEYBOARD_REMOTE_DISCONNECTED = "keyboard_remote_disconnected"

Definition at line 34 of file __init__.py.

◆ TYPE

string homeassistant.components.keyboard_remote.TYPE = "type"

Definition at line 36 of file __init__.py.