Skip to content

Commit f1d2449

Browse files
committed
fix exception error message #107
1 parent 556aacd commit f1d2449

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

custom_components/pyscript/function.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ async def service_call(*args, **kwargs):
278278
hass_args[keyword] = default
279279

280280
if len(args) != 0:
281-
raise (TypeError, f"service {domain}.{service} takes no positional arguments")
281+
raise TypeError(f"service {domain}.{service} takes only keyword arguments")
282282

283283
await cls.hass.services.async_call(domain, service, kwargs, **hass_args)
284284

0 commit comments

Comments
 (0)