Skip to content

Commit

Permalink
minor fixes to last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
craigbarratt committed Oct 17, 2020
1 parent 59c12f9 commit b7bb235
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions custom_components/pyscript/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -428,8 +428,9 @@ async def do_service_call(func, ast_ctx, data):
break
else:
continue
for ok_type in arg_info["type"]:
mesg += f", or {ok_type.__name__}"
mesg += ", or " + ", or ".join(
sorted([ok_type.__name__ for ok_type in arg_info["type"]])
)
self.logger.error(
"%s defined in %s: decorator @%s argument %d should be a %s; ignoring decorator",
self.name,
Expand Down
4 changes: 2 additions & 2 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ the prior value is also available to the expression as ``domain.name.old`` in ca
condition the trigger on the prior value too.

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

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

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

0 comments on commit b7bb235

Please sign in to comment.