Remove unnecessary assignment of Template.hass from emulated_kasa (#123670)

This commit is contained in:
Erik Montnemery 2024-08-12 14:53:22 +02:00 committed by GitHub
parent b9010e96a0
commit 77e9acd864
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -95,8 +95,6 @@ async def validate_configs(hass, entity_configs):
power_val = entity_config[CONF_POWER]
if isinstance(power_val, str) and is_template_string(power_val):
entity_config[CONF_POWER] = Template(power_val, hass)
elif isinstance(power_val, Template):
entity_config[CONF_POWER].hass = hass
elif CONF_POWER_ENTITY in entity_config:
power_val = entity_config[CONF_POWER_ENTITY]
if hass.states.get(power_val) is None: