Cleanup unifiprotect entity model (#119746)

* Small cleanups to unifiprotect

* Small cleanups to unifiprotect

* Small cleanups to unifiprotect

* Small cleanups to unifiprotect

* tweak

* comments

* comments

* stale docstrings

* missed one

* remove dead code

* remove dead code

* remove dead code

* remove dead code

* cleanup
This commit is contained in:
J. Nick Koston 2024-06-15 21:02:03 -05:00 committed by GitHub
parent c0a680a80a
commit c519e12042
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 101 additions and 144 deletions

View file

@ -23,7 +23,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .const import DEVICES_THAT_ADOPT, DISPATCH_ADD, DOMAIN
from .data import ProtectData, UFPConfigEntry
from .entity import ProtectDeviceEntity, async_all_device_entities
from .models import PermRequired, ProtectRequiredKeysMixin, ProtectSetableKeysMixin, T
from .models import PermRequired, ProtectEntityDescription, ProtectSetableKeysMixin, T
from .utils import async_dispatch_id as _ufpd
_LOGGER = logging.getLogger(__name__)
@ -95,7 +95,7 @@ CHIME_BUTTONS: tuple[ProtectButtonEntityDescription, ...] = (
)
_MODEL_DESCRIPTIONS: dict[ModelType, Sequence[ProtectRequiredKeysMixin]] = {
_MODEL_DESCRIPTIONS: dict[ModelType, Sequence[ProtectEntityDescription]] = {
ModelType.CHIME: CHIME_BUTTONS,
ModelType.SENSOR: SENSOR_BUTTONS,
}