File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
custom_components/battery_notes Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ def __init__(
130130 self .device_id = config_entry .data .get (CONF_DEVICE_ID , None )
131131 self .source_entity_id = config_entry .data .get (CONF_SOURCE_ENTITY_ID , None )
132132
133- if not self ._link_device ():
133+ if not self ._link_to_source ():
134134 self .is_orphaned = True
135135 return
136136
@@ -201,8 +201,8 @@ def __init__(
201201 )
202202 self .last_reported = last_reported
203203
204- def _link_device (self ) -> bool :
205- """Get the device name."""
204+ def _link_to_source (self ) -> bool :
205+ """Get the source device or entity, determine name and associate our wrapped battery if available ."""
206206 device_registry = dr .async_get (self .hass )
207207 entity_registry = er .async_get (self .hass )
208208
You can’t perform that action at this time.
0 commit comments