Skip to content

Commit

Permalink
Merge pull request #150 from hmmbob/patch-1
Browse files Browse the repository at this point in the history
Use imported websocket function `async_register_command` instead of accessing it directly
  • Loading branch information
Olen authored Apr 5, 2024
2 parents 4061fe4 + 0023085 commit 6751f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/plant/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ async def replace_sensor(call: ServiceCall) -> None:
return

hass.services.async_register(DOMAIN, SERVICE_REPLACE_SENSOR, replace_sensor)
hass.components.websocket_api.async_register_command(ws_get_info)
websocket_api.async_register_command(hass, ws_get_info)
plant.async_schedule_update_ha_state(True)

# Lets add the dummy sensors automatically if we are testing stuff
Expand Down

0 comments on commit 6751f82

Please sign in to comment.