Validate component usage (#23037)
* Update manifest validator * Update circle * Update text * Typo * fix link to codeowners * Merge CODEOWNERS into hassfest * Annotate errors with fixable * Convert error to warning * Lint * Make abs path * Python 3.5... * Typo * Fix tests
This commit is contained in:
parent
fc481133e7
commit
e8343452cd
19 changed files with 415 additions and 220 deletions
|
@ -43,5 +43,5 @@ def async_register_command(hass, command_or_handler, handler=None,
|
|||
async def async_setup(hass, config):
|
||||
"""Initialize the websocket API."""
|
||||
hass.http.register_view(http.WebsocketAPIView)
|
||||
commands.async_register_commands(hass)
|
||||
commands.async_register_commands(hass, async_register_command)
|
||||
return True
|
||||
|
|
|
@ -14,16 +14,15 @@ from . import const, decorators, messages
|
|||
|
||||
|
||||
@callback
|
||||
def async_register_commands(hass):
|
||||
def async_register_commands(hass, async_reg):
|
||||
"""Register commands."""
|
||||
async_reg = hass.components.websocket_api.async_register_command
|
||||
async_reg(handle_subscribe_events)
|
||||
async_reg(handle_unsubscribe_events)
|
||||
async_reg(handle_call_service)
|
||||
async_reg(handle_get_states)
|
||||
async_reg(handle_get_services)
|
||||
async_reg(handle_get_config)
|
||||
async_reg(handle_ping)
|
||||
async_reg(hass, handle_subscribe_events)
|
||||
async_reg(hass, handle_unsubscribe_events)
|
||||
async_reg(hass, handle_call_service)
|
||||
async_reg(hass, handle_get_states)
|
||||
async_reg(hass, handle_get_services)
|
||||
async_reg(hass, handle_get_config)
|
||||
async_reg(hass, handle_ping)
|
||||
|
||||
|
||||
def pong_message(iden):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue