mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Remove dead code from script helper (#122074)
This commit is contained in:
parent
7bf4e4779c
commit
385f5be7e8
@ -1792,10 +1792,7 @@ class Script:
|
|||||||
await asyncio.shield(create_eager_task(self._async_stop(aws, update_state)))
|
await asyncio.shield(create_eager_task(self._async_stop(aws, update_state)))
|
||||||
|
|
||||||
async def _async_get_condition(self, config):
|
async def _async_get_condition(self, config):
|
||||||
if isinstance(config, template.Template):
|
config_cache_key = frozenset((k, str(v)) for k, v in config.items())
|
||||||
config_cache_key = config.template
|
|
||||||
else:
|
|
||||||
config_cache_key = frozenset((k, str(v)) for k, v in config.items())
|
|
||||||
if not (cond := self._config_cache.get(config_cache_key)):
|
if not (cond := self._config_cache.get(config_cache_key)):
|
||||||
cond = await condition.async_from_config(self._hass, config)
|
cond = await condition.async_from_config(self._hass, config)
|
||||||
self._config_cache[config_cache_key] = cond
|
self._config_cache[config_cache_key] = cond
|
||||||
|
Loading…
x
Reference in New Issue
Block a user