mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Improve ring
typing (#86539)
This commit is contained in:
parent
d36d98937d
commit
58e8f53117
@ -3,6 +3,7 @@ from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.binary_sensor import (
|
||||
BinarySensorDeviceClass,
|
||||
@ -70,7 +71,7 @@ async def async_setup_entry(
|
||||
class RingBinarySensor(RingEntityMixin, BinarySensorEntity):
|
||||
"""A binary sensor implementation for Ring device."""
|
||||
|
||||
_active_alert = None
|
||||
_active_alert: dict[str, Any] | None = None
|
||||
entity_description: RingBinarySensorEntityDescription
|
||||
|
||||
def __init__(
|
||||
|
@ -1,5 +1,6 @@
|
||||
"""Config flow for Ring integration."""
|
||||
import logging
|
||||
from typing import Any
|
||||
|
||||
from oauthlib.oauth2 import AccessDeniedError, MissingTokenError
|
||||
from ring_doorbell import Auth
|
||||
@ -38,7 +39,7 @@ class RingConfigFlow(config_entries.ConfigFlow, domain=DOMAIN):
|
||||
|
||||
VERSION = 1
|
||||
|
||||
user_pass = None
|
||||
user_pass: dict[str, Any] = {}
|
||||
|
||||
async def async_step_user(self, user_input=None):
|
||||
"""Handle the initial step."""
|
||||
|
@ -2,6 +2,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from typing import Any
|
||||
|
||||
from homeassistant.components.sensor import (
|
||||
SensorDeviceClass,
|
||||
@ -123,7 +124,7 @@ class HealthDataRingSensor(RingSensor):
|
||||
class HistoryRingSensor(RingSensor):
|
||||
"""Ring sensor that relies on history data."""
|
||||
|
||||
_latest_event = None
|
||||
_latest_event: dict[str, Any] | None = None
|
||||
|
||||
async def async_added_to_hass(self) -> None:
|
||||
"""Register callbacks."""
|
||||
|
Loading…
x
Reference in New Issue
Block a user