Allow iteration in python_script (#8134)

* Allow iteration in python_script

* Add tests
This commit is contained in:
Paulus Schoutsen
2017-06-21 04:32:50 -07:00
parent 4b1dcad7ae
commit 8d76e2679d
2 changed files with 16 additions and 0 deletions

View File

@@ -92,6 +92,7 @@ def execute(hass, filename, source, data=None):
'_print_': StubPrinter,
'_getattr_': protected_getattr,
'_write_': full_write_guard,
'_getiter_': iter,
}
logger = logging.getLogger('{}.{}'.format(__name__, filename))
local = {