Fix locative device update (#24744)
* Add a test for two devices * Fix locative updating all devices * Add a guard clause that checks if correct device is passed.
This commit is contained in:
1 parent
6e14e8ed91
commit
d4fc22add4
2 files changed
+39
No files matched your search
@@ -85,6 +85,8 @@ class LocativeEntity(DeviceTrackerEntity):
|
||||
@callback
|
||||
def _async_receive_data(self, device, location, location_name):
|
||||
"""Update device data."""
|
||||
if device != self._name:
|
||||
return
|
||||
self._location_name = location_name
|
||||
self._location = location
|
||||
self.async_write_ha_state()
|
||||
Reference in new issue
Block a user