Address late review of flipr (#67477)

This commit is contained in:
cnico 2022-03-02 13:00:33 +01:00 committed by GitHub
parent 3c3a27584a
commit beb4756eb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -75,8 +75,7 @@ class FliprDataUpdateCoordinator(DataUpdateCoordinator):
self.client.get_pool_measure_latest, self.flipr_id
)
except (FliprError) as error:
_LOGGER.error(error)
raise UpdateFailed from error
raise UpdateFailed(error) from error
return data

View File

@ -5,6 +5,7 @@ from unittest.mock import patch
from homeassistant.components.flipr.const import CONF_FLIPR_ID, DOMAIN
from homeassistant.const import CONF_EMAIL, CONF_PASSWORD
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as entity_reg
from homeassistant.util import dt as dt_util
from tests.common import MockConfigEntry
@ -36,7 +37,7 @@ async def test_sensors(hass: HomeAssistant) -> None:
entry.add_to_hass(hass)
registry = await hass.helpers.entity_registry.async_get_registry()
registry = entity_reg.async_get(hass)
with patch(
"flipr_api.FliprAPIRestClient.get_pool_measure_latest",

View File

@ -13,6 +13,7 @@ from homeassistant.const import (
TEMP_CELSIUS,
)
from homeassistant.core import HomeAssistant
from homeassistant.helpers import entity_registry as entity_reg
from homeassistant.util import dt as dt_util
from tests.common import MockConfigEntry
@ -44,7 +45,7 @@ async def test_sensors(hass: HomeAssistant) -> None:
entry.add_to_hass(hass)
registry = await hass.helpers.entity_registry.async_get_registry()
registry = entity_reg.async_get(hass)
with patch(
"flipr_api.FliprAPIRestClient.get_pool_measure_latest",
@ -102,7 +103,7 @@ async def test_error_flipr_api_sensors(hass: HomeAssistant) -> None:
entry.add_to_hass(hass)
registry = await hass.helpers.entity_registry.async_get_registry()
registry = entity_reg.async_get(hass)
with patch(
"flipr_api.FliprAPIRestClient.get_pool_measure_latest",