diff --git a/homeassistant/components/mqtt/cover.py b/homeassistant/components/mqtt/cover.py index 325433817c0..8d4df0c301d 100644 --- a/homeassistant/components/mqtt/cover.py +++ b/homeassistant/components/mqtt/cover.py @@ -25,7 +25,6 @@ from homeassistant.const import ( STATE_CLOSING, STATE_OPEN, STATE_OPENING, - STATE_UNKNOWN, ) from homeassistant.core import HomeAssistant, callback import homeassistant.helpers.config_validation as cv @@ -470,7 +469,6 @@ class MqttCover(MqttEntity, CoverEntity): } if self._config.get(CONF_TILT_STATUS_TOPIC) is not None: - self._tilt_value = STATE_UNKNOWN topics["tilt_status_topic"] = { "topic": self._config.get(CONF_TILT_STATUS_TOPIC), "msg_callback": tilt_message_received, diff --git a/tests/components/mqtt/test_cover.py b/tests/components/mqtt/test_cover.py index 5796c12f3cf..31e30ebf11a 100644 --- a/tests/components/mqtt/test_cover.py +++ b/tests/components/mqtt/test_cover.py @@ -1256,12 +1256,8 @@ async def test_tilt_defaults(hass, mqtt_mock_entry_with_yaml_config): await mqtt_mock_entry_with_yaml_config() state_attributes_dict = hass.states.get("cover.test").attributes - assert ATTR_CURRENT_TILT_POSITION in state_attributes_dict - - current_cover_position = hass.states.get("cover.test").attributes[ - ATTR_CURRENT_TILT_POSITION - ] - assert current_cover_position == STATE_UNKNOWN + # Tilt position is not yet known + assert ATTR_CURRENT_TILT_POSITION not in state_attributes_dict async def test_tilt_via_invocation_defaults(hass, mqtt_mock_entry_with_yaml_config):