Isolate consts better to where they are used (#63569)

This commit is contained in:
Christopher Bailey 2022-01-06 16:57:56 -05:00 committed by GitHub
parent 442690b885
commit 3e2495f417
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 21 additions and 33 deletions

View file

@ -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, ...] = (