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 <marhje52@gmail.com>

* Update homeassistant/components/nuki/binary_sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/nuki/lock.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

* Update homeassistant/components/nuki/sensor.py

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>

---------

Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
This commit is contained in:
steffenrapp 2024-03-06 09:01:14 +01:00 committed by GitHub
parent 403b47f712
commit 64dcc4606f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 0 deletions

View File

@ -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."""

View File

@ -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."""

View File

@ -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."""