mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 20:27:08 +00:00
Fix for see service attributes (#4023)
This commit is contained in:
parent
89e8fb4066
commit
53ea926292
@ -103,8 +103,7 @@ def see(hass: HomeAssistantType, mac: str=None, dev_id: str=None,
|
||||
(ATTR_GPS_ACCURACY, gps_accuracy),
|
||||
(ATTR_BATTERY, battery)) if value is not None}
|
||||
if attributes:
|
||||
for key, value in attributes:
|
||||
data[key] = value
|
||||
data[ATTR_ATTRIBUTES] = attributes
|
||||
hass.services.call(DOMAIN, SERVICE_SEE, data)
|
||||
|
||||
|
||||
|
@ -283,7 +283,10 @@ class TestComponentsDeviceTracker(unittest.TestCase):
|
||||
'dev_id': 'some_device',
|
||||
'host_name': 'example.com',
|
||||
'location_name': 'Work',
|
||||
'gps': [.3, .8]
|
||||
'gps': [.3, .8],
|
||||
'attributes': {
|
||||
'test': 'test'
|
||||
}
|
||||
}
|
||||
device_tracker.see(self.hass, **params)
|
||||
self.hass.block_till_done()
|
||||
|
Loading…
x
Reference in New Issue
Block a user