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:
parent
6e14e8ed91
commit
d4fc22add4
2 changed files with 39 additions and 0 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue