Classes | |
| class | ScriptError |
| class | StubPrinter |
| class | TimeWrapper |
Functions | |
| None | discover_scripts (HomeAssistant hass) |
| def | execute (hass, filename, source, data=None, return_response=False) |
| def | execute_script (hass, name, data=None, return_response=False) |
| Any | guarded_inplacevar (str op, Any target, Any operand) |
| bool | setup (HomeAssistant hass, ConfigType config) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| dictionary | ALLOWED_DATETIME = {"date", "time", "datetime", "timedelta", "tzinfo"} |
| dictionary | ALLOWED_DT_UTIL |
| dictionary | ALLOWED_EVENTBUS = {"fire"} |
| dictionary | ALLOWED_HASS = {"bus", "services", "states"} |
| dictionary | ALLOWED_SERVICEREGISTRY = {"services", "has_service", "call"} |
| dictionary | ALLOWED_STATEMACHINE |
| dictionary | ALLOWED_TIME |
| string | CONF_FIELDS = "fields" |
| CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema(dict)}, extra=vol.ALLOW_EXTRA) | |
| string | DOMAIN = "python_script" |
| string | FOLDER = "python_scripts" |
| dictionary | IOPERATOR_TO_OPERATOR |
Component to allow running Python scripts.
| None homeassistant.components.python_script.discover_scripts | ( | HomeAssistant | hass | ) |
Discover python scripts in folder.
Definition at line 111 of file __init__.py.
| def homeassistant.components.python_script.execute | ( | hass, | |
| filename, | |||
| source, | |||
data = None, |
|||
return_response = False |
|||
| ) |
Execute Python source.
Definition at line 194 of file __init__.py.
| def homeassistant.components.python_script.execute_script | ( | hass, | |
| name, | |||
data = None, |
|||
return_response = False |
|||
| ) |
Execute a script.
Definition at line 184 of file __init__.py.
| Any homeassistant.components.python_script.guarded_inplacevar | ( | str | op, |
| Any | target, | ||
| Any | operand | ||
| ) |
Implement augmented-assign (+=, -=, etc.) operators for restricted code. See RestrictedPython's `visit_AugAssign` for details.
Definition at line 170 of file __init__.py.
| bool homeassistant.components.python_script.setup | ( | HomeAssistant | hass, |
| ConfigType | config | ||
| ) |
Initialize the Python script component.
Definition at line 92 of file __init__.py.
|
private |
Definition at line 41 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_DATETIME = {"date", "time", "datetime", "timedelta", "tzinfo"} |
Definition at line 71 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_DT_UTIL |
Definition at line 72 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_EVENTBUS = {"fire"} |
Definition at line 50 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_HASS = {"bus", "services", "states"} |
Definition at line 49 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_SERVICEREGISTRY = {"services", "has_service", "call"} |
Definition at line 60 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_STATEMACHINE |
Definition at line 51 of file __init__.py.
| dictionary homeassistant.components.python_script.ALLOWED_TIME |
Definition at line 61 of file __init__.py.
| string homeassistant.components.python_script.CONF_FIELDS = "fields" |
Definition at line 85 of file __init__.py.
| homeassistant.components.python_script.CONFIG_SCHEMA = vol.Schema({DOMAIN: vol.Schema(dict)}, extra=vol.ALLOW_EXTRA) |
Definition at line 47 of file __init__.py.
| string homeassistant.components.python_script.DOMAIN = "python_script" |
Definition at line 43 of file __init__.py.
| string homeassistant.components.python_script.FOLDER = "python_scripts" |
Definition at line 45 of file __init__.py.
| dictionary homeassistant.components.python_script.IOPERATOR_TO_OPERATOR |
Definition at line 153 of file __init__.py.