From 9377a45d8aa66246cbf323347c3526ce587b51a7 Mon Sep 17 00:00:00 2001 From: Niccolo Zapponi Date: Thu, 8 Apr 2021 12:50:46 +0100 Subject: [PATCH] Fix iCloud extra attributes (#48815) --- homeassistant/components/icloud/account.py | 2 +- homeassistant/components/icloud/device_tracker.py | 2 +- homeassistant/components/icloud/sensor.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/icloud/account.py b/homeassistant/components/icloud/account.py index a357df39e42e..5c3bd2bf5196 100644 --- a/homeassistant/components/icloud/account.py +++ b/homeassistant/components/icloud/account.py @@ -501,6 +501,6 @@ class IcloudDevice: return self._location @property - def exta_state_attributes(self) -> dict[str, any]: + def extra_state_attributes(self) -> dict[str, any]: """Return the attributes.""" return self._attrs diff --git a/homeassistant/components/icloud/device_tracker.py b/homeassistant/components/icloud/device_tracker.py index 3dbc10bcf1b3..502c2b00f8bb 100644 --- a/homeassistant/components/icloud/device_tracker.py +++ b/homeassistant/components/icloud/device_tracker.py @@ -110,7 +110,7 @@ class IcloudTrackerEntity(TrackerEntity): @property def extra_state_attributes(self) -> dict[str, any]: """Return the device state attributes.""" - return self._device.state_attributes + return self._device.extra_state_attributes @property def device_info(self) -> dict[str, any]: diff --git a/homeassistant/components/icloud/sensor.py b/homeassistant/components/icloud/sensor.py index ddd3d54c556a..f889495af25e 100644 --- a/homeassistant/components/icloud/sensor.py +++ b/homeassistant/components/icloud/sensor.py @@ -93,7 +93,7 @@ class IcloudDeviceBatterySensor(SensorEntity): @property def extra_state_attributes(self) -> dict[str, any]: """Return default attributes for the iCloud device entity.""" - return self._device.state_attributes + return self._device.extra_state_attributes @property def device_info(self) -> dict[str, any]: