mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 06:07:17 +00:00
Remove unnecessary assignment of Template.hass from telnet (#123694)
This commit is contained in:
parent
3c864322f7
commit
b62f216c53
@ -67,11 +67,6 @@ def setup_platform(
|
|||||||
switches = []
|
switches = []
|
||||||
|
|
||||||
for object_id, device_config in devices.items():
|
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(
|
switches.append(
|
||||||
TelnetSwitch(
|
TelnetSwitch(
|
||||||
object_id,
|
object_id,
|
||||||
@ -81,7 +76,7 @@ def setup_platform(
|
|||||||
device_config[CONF_COMMAND_ON],
|
device_config[CONF_COMMAND_ON],
|
||||||
device_config[CONF_COMMAND_OFF],
|
device_config[CONF_COMMAND_OFF],
|
||||||
device_config.get(CONF_COMMAND_STATE),
|
device_config.get(CONF_COMMAND_STATE),
|
||||||
value_template,
|
device_config.get(CONF_VALUE_TEMPLATE),
|
||||||
device_config[CONF_TIMEOUT],
|
device_config[CONF_TIMEOUT],
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user