mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
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:
parent
403b47f712
commit
64dcc4606f
@ -50,6 +50,7 @@ class NukiDoorsensorEntity(NukiEntity[NukiDevice], BinarySensorEntity):
|
|||||||
"""Return a unique ID."""
|
"""Return a unique ID."""
|
||||||
return f"{self._nuki_device.nuki_id}_doorsensor"
|
return f"{self._nuki_device.nuki_id}_doorsensor"
|
||||||
|
|
||||||
|
# Deprecated, can be removed in 2024.10
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self):
|
||||||
"""Return the device specific state attributes."""
|
"""Return the device specific state attributes."""
|
||||||
@ -90,6 +91,7 @@ class NukiRingactionEntity(NukiEntity[NukiDevice], BinarySensorEntity):
|
|||||||
"""Return a unique ID."""
|
"""Return a unique ID."""
|
||||||
return f"{self._nuki_device.nuki_id}_ringaction"
|
return f"{self._nuki_device.nuki_id}_ringaction"
|
||||||
|
|
||||||
|
# Deprecated, can be removed in 2024.10
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self):
|
||||||
"""Return the device specific state attributes."""
|
"""Return the device specific state attributes."""
|
||||||
|
@ -76,6 +76,7 @@ class NukiDeviceEntity(NukiEntity[_NukiDeviceT], LockEntity):
|
|||||||
"""Return a unique ID."""
|
"""Return a unique ID."""
|
||||||
return self._nuki_device.nuki_id
|
return self._nuki_device.nuki_id
|
||||||
|
|
||||||
|
# Deprecated, can be removed in 2024.10
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self) -> dict[str, Any]:
|
def extra_state_attributes(self) -> dict[str, Any]:
|
||||||
"""Return the device specific state attributes."""
|
"""Return the device specific state attributes."""
|
||||||
|
@ -37,6 +37,7 @@ class NukiBatterySensor(NukiEntity[NukiDevice], SensorEntity):
|
|||||||
"""Return a unique ID."""
|
"""Return a unique ID."""
|
||||||
return f"{self._nuki_device.nuki_id}_battery_level"
|
return f"{self._nuki_device.nuki_id}_battery_level"
|
||||||
|
|
||||||
|
# Deprecated, can be removed in 2024.10
|
||||||
@property
|
@property
|
||||||
def extra_state_attributes(self):
|
def extra_state_attributes(self):
|
||||||
"""Return the device specific state attributes."""
|
"""Return the device specific state attributes."""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user