Add max_exceeded log level option to automations & scripts (#39448)

This commit is contained in:
Phil Bruckner authored and GitHub committed 2020-09-02 11:05:14 +02:00
1 parent 603707aa85
commit 4486251382
4 files changed
+75 -2

No files matched your search

@@ -28,6 +28,7 @@ from homeassistant.helpers.script import (
ATTR_MAX,
ATTR_MODE,
CONF_MAX,
CONF_MAX_EXCEEDED,
SCRIPT_MODE_SINGLE,
Script,
make_script_schema,
@@ -260,6 +261,7 @@ class ScriptEntity(ToggleEntity):
change_listener=self.async_change_listener,
script_mode=cfg[CONF_MODE],
max_runs=cfg[CONF_MAX],
max_exceeded=cfg[CONF_MAX_EXCEEDED],
logger=logging.getLogger(f"{__name__}.{object_id}"),
)
self._changed = asyncio.Event()