Skip to content

Commit 01e57a2

Browse files
nrbrtclaude
andcommitted
fix: merge upstream PR sanjoyg#196 — ikea_bulb_device_set registration fix
Cherry-pick from sanjoyg#196 (by pablotoledo). Two fixes: 1. ikea_bulb_device_set now registers with registry_entry wrapper instead of directly, fixing AttributeError in sync_all_device_areas() 2. Use Python built-in ConnectionError instead of requests import for ConfigEntryNotReady handling Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2 parents 11e9331 + 80d52e6 commit 01e57a2

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

custom_components/dirigera_platform/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
from homeassistant import config_entries, core
1515
from homeassistant.exceptions import ConfigEntryNotReady
16-
import requests as _requests
1716
from homeassistant.components.light import PLATFORM_SCHEMA
1817
from homeassistant.const import CONF_IP_ADDRESS, CONF_TOKEN, Platform
1918

@@ -199,7 +198,7 @@ async def async_setup_entry(
199198
logger.debug("Starting make_devices...")
200199
try:
201200
await platform.make_devices(hass,hass_data[CONF_IP_ADDRESS], hass_data[CONF_TOKEN])
202-
except (_requests.exceptions.ConnectionError, OSError) as err:
201+
except (ConnectionError, OSError) as err:
203202
raise ConfigEntryNotReady(
204203
f"Cannot connect to IKEA Dirigera hub at {hass_data[CONF_IP_ADDRESS]}: {err}"
205204
) from err

0 commit comments

Comments
 (0)