Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
Snuffy2 and coderabbitai[bot] authored Jul 26, 2024
1 parent c0cd41c commit 9be373a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions custom_components/variable/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
async def async_setup(hass: HomeAssistant, config: ConfigType):
"""Set up the Variable services."""

async def async_set_variable_legacy_service(call: ServiceCall):
async def async_set_variable_legacy_service(call: ServiceCall) -> None:
"""Handle calls to the set_variable legacy service."""

# _LOGGER.debug(f"[async_set_variable_legacy_service] Pre call data: {call.data}")
Expand All @@ -81,7 +81,7 @@ async def async_set_variable_legacy_service(call: ServiceCall):
# _LOGGER.debug(f"[async_set_variable_legacy_service] Post call data: {call.data}")
await _async_set_legacy_service(call, var_ent)

async def async_set_entity_legacy_service(call: ServiceCall):
async def async_set_entity_legacy_service(call: ServiceCall) -> None:
"""Handle calls to the set_entity legacy service."""

# _LOGGER.debug(f"[async_set_entity_legacy_service] call data: {call.data}")
Expand All @@ -106,7 +106,7 @@ async def _async_set_legacy_service(call: ServiceCall, var_ent: str):
DOMAIN, SERVICE_UPDATE_SENSOR, service_data=update_sensor_data
)

async def _async_reload_service_handler(service: ServiceCall):
async def _async_reload_service_handler(service: ServiceCall) -> None:
"""Handle reload service call."""
_LOGGER.info("Service %s.reload called: reloading YAML integration", DOMAIN)
reload_config = None
Expand All @@ -116,7 +116,6 @@ async def _async_reload_service_handler(service: ServiceCall):
return
_LOGGER.debug(f" reload_config: {reload_config}")
await _async_process_yaml(hass, reload_config)

hass.services.async_register(
DOMAIN,
SERVICE_SET_VARIABLE_LEGACY,
Expand Down

0 comments on commit 9be373a

Please sign in to comment.