diff --git a/homeassistant/components/serial/sensor.py b/homeassistant/components/serial/sensor.py index e3fee36c09e..e7c39d97f6a 100644 --- a/homeassistant/components/serial/sensor.py +++ b/homeassistant/components/serial/sensor.py @@ -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,