Isolate consts better to where they are used (#63569)
This commit is contained in:
parent
442690b885
commit
3e2495f417
5 changed files with 21 additions and 33 deletions
|
@ -3,7 +3,7 @@ from __future__ import annotations
|
|||
|
||||
from copy import copy
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from datetime import datetime, timedelta
|
||||
import logging
|
||||
from typing import Any, Final
|
||||
|
||||
|
@ -25,7 +25,7 @@ from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
|||
from homeassistant.helpers.event import async_call_later
|
||||
from homeassistant.util.dt import utcnow
|
||||
|
||||
from .const import DOMAIN, RING_INTERVAL
|
||||
from .const import DOMAIN
|
||||
from .data import ProtectData
|
||||
from .entity import ProtectDeviceEntity, ProtectNVREntity, async_all_device_entities
|
||||
from .models import ProtectRequiredKeysMixin
|
||||
|
@ -49,6 +49,7 @@ _KEY_BATTERY_LOW = "battery_low"
|
|||
_KEY_DISK_HEALTH = "disk_health"
|
||||
|
||||
DEVICE_CLASS_RING: Final = "unifiprotect__ring"
|
||||
RING_INTERVAL = timedelta(seconds=3)
|
||||
|
||||
|
||||
CAMERA_SENSORS: tuple[ProtectBinaryEntityDescription, ...] = (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue