mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
Device Registry Support for iOS Sensors (#16862)
* Add device_info property to iOS sensors for device registry * Remove unused logger import * Fix spacing * lint * Lint
This commit is contained in:
parent
bfa1c55803
commit
3cba2e695c
@ -46,6 +46,21 @@ class IOSSensor(Entity):
|
|||||||
self._state = None
|
self._state = None
|
||||||
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
|
self._unit_of_measurement = SENSOR_TYPES[sensor_type][1]
|
||||||
|
|
||||||
|
@property
|
||||||
|
def device_info(self):
|
||||||
|
"""Return information about the device."""
|
||||||
|
return {
|
||||||
|
'identifiers': {
|
||||||
|
(ios.DOMAIN,
|
||||||
|
self._device[ios.ATTR_DEVICE][ios.ATTR_DEVICE_PERMANENT_ID]),
|
||||||
|
},
|
||||||
|
'name': self._device[ios.ATTR_DEVICE][ios.ATTR_DEVICE_NAME],
|
||||||
|
'manufacturer': 'Apple',
|
||||||
|
'model': self._device[ios.ATTR_DEVICE][ios.ATTR_DEVICE_TYPE],
|
||||||
|
'sw_version':
|
||||||
|
self._device[ios.ATTR_DEVICE][ios.ATTR_DEVICE_SYSTEM_VERSION],
|
||||||
|
}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def name(self):
|
def name(self):
|
||||||
"""Return the name of the iOS sensor."""
|
"""Return the name of the iOS sensor."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user