diff --git a/homeassistant/helpers/entity.py b/homeassistant/helpers/entity.py index b7ed7e3c095..3c3c8474e67 100644 --- a/homeassistant/helpers/entity.py +++ b/homeassistant/helpers/entity.py @@ -1481,7 +1481,7 @@ class Entity( If the entity is not added to a platform it's not safe to call _stringify_state. """ if self._platform_state != EntityPlatformState.ADDED: - return f"" + return f"" return f"" async def async_request_call(self, coro: Coroutine[Any, Any, _T]) -> _T: diff --git a/tests/helpers/test_entity.py b/tests/helpers/test_entity.py index 4fca7ed4c23..a18d8963947 100644 --- a/tests/helpers/test_entity.py +++ b/tests/helpers/test_entity.py @@ -1407,7 +1407,7 @@ async def test_repr(hass) -> None: my_entity = MyEntity(entity_id="test.test", available=False) # Not yet added - assert str(my_entity) == "" + assert str(my_entity) == "" # Added await platform.async_add_entities([my_entity]) @@ -1415,7 +1415,7 @@ async def test_repr(hass) -> None: # Removed await platform.async_remove_entity(my_entity.entity_id) - assert str(my_entity) == "" + assert str(my_entity) == "" async def test_warn_using_async_update_ha_state(