Hi! Not sure if this is a bug or if it should be a feature request, so I’ll start here.
I’ve created a really small python script, named vacuum_room.py
like this:
# Vacuum a specific room
rooms = []
roomString = data.get("room").lower()
if any(r in roomString for r in ["nursery", "kids room"]):
rooms.append(20)
However, when I try to run it I get:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/components/python_script/__init__.py", line 205, in execute
exec(compiled.code, restricted_globals)
File "vacuum_room.py", line 6, in <module>
NameError: name 'any' is not defined
I would have guessed any
is a builtin Python function that should be available to me when creating python scripts, no? Is there any way to make it available or should I just write my own any
-function?
Running Home Assistant 0.115.6 in Docker on a Synology DS718+