Improve nuki typing (#86736)
* Use NukiCoordinator * Make NukiEntity generic * Remove unnecessary ABC
This commit is contained in:
parent
138a522d2e
commit
caa1ba7e13
4 changed files with 54 additions and 49 deletions
|
@ -1,4 +1,7 @@
|
|||
"""Battery sensor for the Nuki Lock."""
|
||||
from __future__ import annotations
|
||||
|
||||
from pynuki.device import NukiDevice
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
|
@ -23,7 +26,7 @@ async def async_setup_entry(
|
|||
)
|
||||
|
||||
|
||||
class NukiBatterySensor(NukiEntity, SensorEntity):
|
||||
class NukiBatterySensor(NukiEntity[NukiDevice], SensorEntity):
|
||||
"""Representation of a Nuki Lock Battery sensor."""
|
||||
|
||||
_attr_has_entity_name = True
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue