Remove unnecessary assignment of Template.hass from serial (#123686)

This commit is contained in:
Erik Montnemery 2024-08-12 15:52:41 +02:00 committed by GitHub
parent ecd061d46f
commit b04e3dc6fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,9 +93,7 @@ async def async_setup_platform(
xonxoff = config.get(CONF_XONXOFF)
rtscts = config.get(CONF_RTSCTS)
dsrdtr = config.get(CONF_DSRDTR)
if (value_template := config.get(CONF_VALUE_TEMPLATE)) is not None:
value_template.hass = hass
value_template = config.get(CONF_VALUE_TEMPLATE)
sensor = SerialSensor(
name,