Remove unnecessary assignment of Template.hass from telnet (#123694)

This commit is contained in:
Erik Montnemery 2024-08-12 21:49:46 +02:00 committed by GitHub
parent 3c864322f7
commit b62f216c53
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -67,11 +67,6 @@ def setup_platform(
switches = []
for object_id, device_config in devices.items():
value_template: Template | None = device_config.get(CONF_VALUE_TEMPLATE)
if value_template is not None:
value_template.hass = hass
switches.append(
TelnetSwitch(
object_id,
@ -81,7 +76,7 @@ def setup_platform(
device_config[CONF_COMMAND_ON],
device_config[CONF_COMMAND_OFF],
device_config.get(CONF_COMMAND_STATE),
value_template,
device_config.get(CONF_VALUE_TEMPLATE),
device_config[CONF_TIMEOUT],
)
)