Skip to content

Commit

Permalink
feat: Adds dummy updated websocket handler
Browse files Browse the repository at this point in the history
  • Loading branch information
MislavMandaric committed Dec 2, 2021
1 parent e2a4dc5 commit 7973553
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions custom_components/vaillant_vsmart/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@ async def websocket_get_schedule_item(
break


@decorators.websocket_command(
{
vol.Required("type"): f"{DOMAIN}_updated",
}
)
@decorators.async_response
async def websocket_schedule_item_updated(
hass: HomeAssistant,
connection: ActiveConnection,
msg: dict,
) -> None:
"""Publish scheduler list data."""

connection.send_result(msg["id"])


@decorators.websocket_command(
{
vol.Required("type"): f"{DOMAIN}/tags",
Expand All @@ -100,4 +116,7 @@ async def websocket_get_tags(
async def async_register_websockets(hass: HomeAssistant) -> None:
hass.components.websocket_api.async_register_command(websocket_get_schedules)
hass.components.websocket_api.async_register_command(websocket_get_schedule_item)
hass.components.websocket_api.async_register_command(
websocket_schedule_item_updated
)
hass.components.websocket_api.async_register_command(websocket_get_tags)

0 comments on commit 7973553

Please sign in to comment.