Add device info to Nextcloud integration (#90328)

* add device_info

* use entry_id as identifier + device name

* use shorthand attributes

* remove model from device info

Co-authored-by: Franck Nijhof <frenck@frenck.nl>

---------

Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
Michael 2023-03-28 12:43:00 +02:00 committed by GitHub
parent 1c465b5ad0
commit e4bb339a1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 8 deletions

View file

@ -65,7 +65,7 @@ async def async_setup_entry(
coordinator: NextcloudDataUpdateCoordinator = hass.data[DOMAIN][entry.entry_id]
async_add_entities(
[
NextcloudSensor(coordinator, name)
NextcloudSensor(coordinator, name, entry)
for name in coordinator.data
if name in SENSORS
]