From 64dcc4606fcaeb93e49737ecb87daf931c1fd59f Mon Sep 17 00:00:00 2001 From: steffenrapp <88974099+steffenrapp@users.noreply.github.com> Date: Wed, 6 Mar 2024 09:01:14 +0100 Subject: [PATCH] Deprecate attributes of Nuki entities (#111419) * Remove attributes from Nuki entities * Comment about deprecation * Update homeassistant/components/nuki/binary_sensor.py Co-authored-by: Martin Hjelmare * Update homeassistant/components/nuki/binary_sensor.py Co-authored-by: Martin Hjelmare * Update homeassistant/components/nuki/lock.py Co-authored-by: Martin Hjelmare * Update homeassistant/components/nuki/sensor.py Co-authored-by: Martin Hjelmare --------- Co-authored-by: Martin Hjelmare --- homeassistant/components/nuki/binary_sensor.py | 2 ++ homeassistant/components/nuki/lock.py | 1 + homeassistant/components/nuki/sensor.py | 1 + 3 files changed, 4 insertions(+) diff --git a/homeassistant/components/nuki/binary_sensor.py b/homeassistant/components/nuki/binary_sensor.py index c01c1c50237..ac2ce24f2b4 100644 --- a/homeassistant/components/nuki/binary_sensor.py +++ b/homeassistant/components/nuki/binary_sensor.py @@ -50,6 +50,7 @@ class NukiDoorsensorEntity(NukiEntity[NukiDevice], BinarySensorEntity): """Return a unique ID.""" return f"{self._nuki_device.nuki_id}_doorsensor" + # Deprecated, can be removed in 2024.10 @property def extra_state_attributes(self): """Return the device specific state attributes.""" @@ -90,6 +91,7 @@ class NukiRingactionEntity(NukiEntity[NukiDevice], BinarySensorEntity): """Return a unique ID.""" return f"{self._nuki_device.nuki_id}_ringaction" + # Deprecated, can be removed in 2024.10 @property def extra_state_attributes(self): """Return the device specific state attributes.""" diff --git a/homeassistant/components/nuki/lock.py b/homeassistant/components/nuki/lock.py index f1e553e6668..974ffbd4d85 100644 --- a/homeassistant/components/nuki/lock.py +++ b/homeassistant/components/nuki/lock.py @@ -76,6 +76,7 @@ class NukiDeviceEntity(NukiEntity[_NukiDeviceT], LockEntity): """Return a unique ID.""" return self._nuki_device.nuki_id + # Deprecated, can be removed in 2024.10 @property def extra_state_attributes(self) -> dict[str, Any]: """Return the device specific state attributes.""" diff --git a/homeassistant/components/nuki/sensor.py b/homeassistant/components/nuki/sensor.py index 3c6775cd171..69d166e4ee5 100644 --- a/homeassistant/components/nuki/sensor.py +++ b/homeassistant/components/nuki/sensor.py @@ -37,6 +37,7 @@ class NukiBatterySensor(NukiEntity[NukiDevice], SensorEntity): """Return a unique ID.""" return f"{self._nuki_device.nuki_id}_battery_level" + # Deprecated, can be removed in 2024.10 @property def extra_state_attributes(self): """Return the device specific state attributes."""