diff --git a/homeassistant/components/tcp/sensor.py b/homeassistant/components/tcp/sensor.py index 84f925829471b..ff5db39bba755 100644 --- a/homeassistant/components/tcp/sensor.py +++ b/homeassistant/components/tcp/sensor.py @@ -29,7 +29,7 @@ import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity_platform import AddEntitiesCallback from homeassistant.helpers.template import Template -from homeassistant.helpers.typing import ConfigType +from homeassistant.helpers.typing import ConfigType, StateType from .const import ( CONF_BUFFER_SIZE, @@ -112,7 +112,7 @@ def name(self) -> str: return self._config[CONF_NAME] @property - def state(self) -> str | None: + def state(self) -> StateType: """Return the state of the device.""" return self._state