Add setup type hints (part 3) (#63961)

* Drop return value from vesync

* Add setup type hints to netgear_lte

* Drop return value from hyperion

* Add setup type hints to opentherm_gw

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-12 12:53:50 +01:00 committed by GitHub
parent 0d58887bc0
commit ec1b45c922
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 15 deletions

View file

@ -6,10 +6,12 @@ from homeassistant.components.sensor import (
SensorEntity,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ENERGY_KILO_WATT_HOUR, POWER_WATT
from homeassistant.core import callback
from homeassistant.core import HomeAssistant, callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.entity import EntityCategory
from homeassistant.helpers.entity_platform import AddEntitiesCallback
from .common import VeSyncBaseEntity
from .const import DOMAIN, VS_DISCOVERY, VS_DISPATCHERS, VS_SENSORS
@ -18,7 +20,11 @@ from .switch import DEV_TYPE_TO_HA
_LOGGER = logging.getLogger(__name__)
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 switches."""
async def async_discover(devices):
@ -31,7 +37,6 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
hass.data[DOMAIN][VS_DISPATCHERS].append(disp)
_async_setup_entities(hass.data[DOMAIN][VS_SENSORS], async_add_entities)
return True
@callback