We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c22460 commit 29f1989Copy full SHA for 29f1989
custom_components/battery_notes/coordinator.py
@@ -130,9 +130,9 @@ def __init__(
130
self.device_id = config_entry.data.get(CONF_DEVICE_ID, None)
131
self.source_entity_id = config_entry.data.get(CONF_SOURCE_ENTITY_ID, None)
132
133
- self._link_device()
134
-
135
- assert(self.device_name)
+ if not self._link_device():
+ self.is_orphaned = True
+ return
136
137
self.battery_type = cast(str, self.config_entry.data.get(CONF_BATTERY_TYPE))
138
try:
0 commit comments