Add setup type hints [c-d] (#63428)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
953a4f07fa
commit
47812575d0
6 changed files with 64 additions and 13 deletions
|
@ -1,10 +1,15 @@
|
|||
"""Support for Coinbase sensors."""
|
||||
from __future__ import annotations
|
||||
|
||||
import logging
|
||||
|
||||
from homeassistant.components.sensor import SensorEntity, SensorStateClass
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ATTR_ATTRIBUTION
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.device_registry import DeviceEntryType
|
||||
from homeassistant.helpers.entity import DeviceInfo
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import (
|
||||
API_ACCOUNT_AMOUNT,
|
||||
|
@ -38,11 +43,15 @@ DEFAULT_COIN_ICON = "mdi:cash"
|
|||
ATTRIBUTION = "Data provided by coinbase.com"
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant,
|
||||
config_entry: ConfigEntry,
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Set up Coinbase sensor platform."""
|
||||
instance = hass.data[DOMAIN][config_entry.entry_id]
|
||||
|
||||
entities = []
|
||||
entities: list[SensorEntity] = []
|
||||
|
||||
provided_currencies = [
|
||||
account[API_ACCOUNT_CURRENCY]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue