Skip to content

Commit 854a2af

Browse files
committed
Disable automatic reconfiguration on failed credentials, as Medisafe web often throws unauthorized error status incorrectly
1 parent 8fe3e3f commit 854a2af

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

custom_components/medisafe/__init__.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from homeassistant.config_entries import ConfigEntry
1818
from homeassistant.core import Config
1919
from homeassistant.core import HomeAssistant
20-
from homeassistant.exceptions import ConfigEntryAuthFailed
2120
from homeassistant.helpers.aiohttp_client import async_get_clientsession
2221
from homeassistant.helpers.update_coordinator import DataUpdateCoordinator
2322
from homeassistant.helpers.update_coordinator import UpdateFailed
@@ -29,6 +28,8 @@
2928
from .const import PLATFORMS
3029
from .const import STARTUP_MESSAGE
3130

31+
# from homeassistant.exceptions import ConfigEntryAuthFailed
32+
3233
SCAN_INTERVAL = timedelta(minutes=15)
3334

3435
_LOGGER: logging.Logger = logging.getLogger(__package__)
@@ -77,8 +78,8 @@ async def _async_update_data(self):
7778
"""Update data via library."""
7879
try:
7980
return await self.config_entry.runtime_data.client.async_get_data()
80-
except ConfigEntryAuthFailed as exception:
81-
raise exception
81+
# except ConfigEntryAuthFailed as exception:
82+
# raise exception
8283
except Exception as exception:
8384
raise UpdateFailed() from exception
8485

custom_components/medisafe/const.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
NAME = "Medisafe"
1515
DOMAIN = "medisafe"
1616
DOMAIN_DATA = f"{DOMAIN}_data"
17-
VERSION = "0.1.2"
17+
VERSION = "0.1.3"
1818

1919
ATTRIBUTION = "Data provided by https://medisafe.com/"
2020
ISSUE_URL = "https://github.com/c99koder/ha-medisafe/issues"

0 commit comments

Comments
 (0)