Skip to content

Commit b7bb235

Browse files
committed
minor fixes to last commit
1 parent 59c12f9 commit b7bb235

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

custom_components/pyscript/eval.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,9 @@ async def do_service_call(func, ast_ctx, data):
428428
break
429429
else:
430430
continue
431-
for ok_type in arg_info["type"]:
432-
mesg += f", or {ok_type.__name__}"
431+
mesg += ", or " + ", or ".join(
432+
sorted([ok_type.__name__ for ok_type in arg_info["type"]])
433+
)
433434
self.logger.error(
434435
"%s defined in %s: decorator @%s argument %d should be a %s; ignoring decorator",
435436
self.name,

docs/reference.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ the prior value is also available to the expression as ``domain.name.old`` in ca
175175
condition the trigger on the prior value too.
176176

177177
Multiple arguments are logically "or"ed together, so the trigger occurs if any of the expressions
178-
evaluate to ``True``. Any argument can alternatively be be a list or set of strings, and they are
178+
evaluate to ``True``. Any argument can alternatively be a list or set of strings, and they are
179179
treated the same as multiple arguments by "or"ing them together.
180180

181181
All state variables in HASS have string values. So you’ll have to do comparisons against string
@@ -205,7 +205,7 @@ You can specify a state trigger on any change with a string that is just the sta
205205
@state_trigger("domain.light_level")
206206
207207
The trigger can include arguments with any mixture of string expressions (that are evaluated
208-
when any of the underlying state variable change) and string state variable names (that trigger
208+
when any of the underlying state variables change) and string state variable names (that trigger
209209
whenever that variable changes).
210210

211211
Note that if a state variable is set to the same value, HASS doesn’t generate a state change event,

0 commit comments

Comments
 (0)