mirror of
https://github.com/home-assistant/core.git
synced 2025-07-24 21:57:51 +00:00
Move imports in keyboard component (#27791)
This commit is contained in:
parent
e54f5102aa
commit
35e0acf0a5
@ -1,4 +1,5 @@
|
|||||||
"""Support to emulate keyboard presses on host machine."""
|
"""Support to emulate keyboard presses on host machine."""
|
||||||
|
from pykeyboard import PyKeyboard # pylint: disable=import-error
|
||||||
import voluptuous as vol
|
import voluptuous as vol
|
||||||
|
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -17,9 +18,8 @@ TAP_KEY_SCHEMA = vol.Schema({})
|
|||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
"""Listen for keyboard events."""
|
"""Listen for keyboard events."""
|
||||||
import pykeyboard # pylint: disable=import-error
|
|
||||||
|
|
||||||
keyboard = pykeyboard.PyKeyboard()
|
keyboard = PyKeyboard()
|
||||||
keyboard.special_key_assignment()
|
keyboard.special_key_assignment()
|
||||||
|
|
||||||
hass.services.register(
|
hass.services.register(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user