Update typing 04 (#48037)

This commit is contained in:
Marc Mueller 2021-03-17 23:34:25 +01:00 committed by GitHub
parent 02619ca2cd
commit 76199c0eb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
44 changed files with 282 additions and 229 deletions

View file

@ -1,7 +1,8 @@
"""Asuswrt status sensors."""
from __future__ import annotations
import logging
from numbers import Number
from typing import Dict
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import DATA_GIGABYTES, DATA_RATE_MEGABITS_PER_SECOND
@ -104,7 +105,7 @@ class AsusWrtSensor(CoordinatorEntity):
coordinator: DataUpdateCoordinator,
router: AsusWrtRouter,
sensor_type: str,
sensor: Dict[str, any],
sensor: dict[str, any],
) -> None:
"""Initialize a AsusWrt sensor."""
super().__init__(coordinator)
@ -159,11 +160,11 @@ class AsusWrtSensor(CoordinatorEntity):
return self._device_class
@property
def extra_state_attributes(self) -> Dict[str, any]:
def extra_state_attributes(self) -> dict[str, any]:
"""Return the attributes."""
return {"hostname": self._router.host}
@property
def device_info(self) -> Dict[str, any]:
def device_info(self) -> dict[str, any]:
"""Return the device information."""
return self._router.device_info