Clean up HEOS strings (#26242)

* Clean up strings

* Shorten lines to ~ 88
This commit is contained in:
Andrew Sayre 2019-08-29 14:23:42 -05:00 committed by GitHub
parent 16fff16082
commit 955bed8df4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View file

@ -87,9 +87,8 @@ async def async_setup_entry(hass: HomeAssistantType, entry: ConfigEntry):
favorites = await controller.get_favorites() favorites = await controller.get_favorites()
else: else:
_LOGGER.warning( _LOGGER.warning(
"%s is not logged in to a HEOS account and will be unable " "%s is not logged in to a HEOS account and will be unable to retrieve "
"to retrieve HEOS favorites: Use the 'heos.sign_in' service " "HEOS favorites: Use the 'heos.sign_in' service to sign-in to a HEOS account",
"to sign-in to a HEOS account",
host, host,
) )
inputs = await controller.get_input_sources() inputs = await controller.get_input_sources()
@ -312,7 +311,7 @@ class SourceManager:
if retry_attempts < self.max_retry_attempts: if retry_attempts < self.max_retry_attempts:
retry_attempts += 1 retry_attempts += 1
_LOGGER.debug( _LOGGER.debug(
"Error retrieving sources and will " "retry: %s", error "Error retrieving sources and will retry: %s", error
) )
await asyncio.sleep(self.retry_delay) await asyncio.sleep(self.retry_delay)
else: else:

View file

@ -108,9 +108,9 @@ async def test_async_setup_entry_not_signed_in_loads_platforms(
assert hass.data[DOMAIN][DATA_SOURCE_MANAGER].favorites == {} assert hass.data[DOMAIN][DATA_SOURCE_MANAGER].favorites == {}
assert hass.data[DOMAIN][DATA_SOURCE_MANAGER].inputs == input_sources assert hass.data[DOMAIN][DATA_SOURCE_MANAGER].inputs == input_sources
assert ( assert (
"127.0.0.1 is not logged in to a HEOS account and will be unable " "127.0.0.1 is not logged in to a HEOS account and will be unable to retrieve "
"to retrieve HEOS favorites: Use the 'heos.sign_in' service to " "HEOS favorites: Use the 'heos.sign_in' service to sign-in to a HEOS account"
"sign-in to a HEOS account" in caplog.text in caplog.text
) )