mirror of
https://github.com/home-assistant/core.git
synced 2025-07-25 22:27:07 +00:00
fix setting battery in device_tracker (#4756)
This commit is contained in:
parent
b60f5714fc
commit
8afd30b7d4
@ -421,7 +421,8 @@ class Device(Entity):
|
|||||||
self.host_name = host_name
|
self.host_name = host_name
|
||||||
self.location_name = location_name
|
self.location_name = location_name
|
||||||
self.gps_accuracy = gps_accuracy or 0
|
self.gps_accuracy = gps_accuracy or 0
|
||||||
|
if battery:
|
||||||
|
self.battery = battery
|
||||||
if attributes:
|
if attributes:
|
||||||
self._attributes.update(attributes)
|
self._attributes.update(attributes)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user