221 files
This commit is contained in:
@@ -21,5 +21,7 @@ class SpookService(AbstractSpookService):
|
||||
|
||||
async def async_handle_service(self, _: ServiceCall) -> None:
|
||||
"""Handle the service call."""
|
||||
msg = "Spooked!"
|
||||
raise HomeAssistantError(msg)
|
||||
raise HomeAssistantError(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="spooked",
|
||||
)
|
||||
|
||||
@@ -23,5 +23,7 @@ class SpookService(AbstractSpookService):
|
||||
async def async_handle_service(self, _: ServiceCall) -> None:
|
||||
"""Handle the service call."""
|
||||
if random.choice([True, False]): # noqa: S311
|
||||
msg = "Spooked!"
|
||||
raise HomeAssistantError(msg)
|
||||
raise HomeAssistantError(
|
||||
translation_domain=DOMAIN,
|
||||
translation_key="spooked",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user