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__(
130
130
self .device_id = config_entry .data .get (CONF_DEVICE_ID , None )
131
131
self .source_entity_id = config_entry .data .get (CONF_SOURCE_ENTITY_ID , None )
132
132
133
- if not self ._link_device ():
133
+ if not self ._link_to_source ():
134
134
self .is_orphaned = True
135
135
return
136
136
@@ -201,8 +201,8 @@ def __init__(
201
201
)
202
202
self .last_reported = last_reported
203
203
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 ."""
206
206
device_registry = dr .async_get (self .hass )
207
207
entity_registry = er .async_get (self .hass )
208
208
You can’t perform that action at this time.
0 commit comments