Add sensor setup type hints [e-f] (#63317)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
4363852178
commit
d24ebc3c10
21 changed files with 191 additions and 26 deletions
|
@ -2,7 +2,10 @@
|
|||
from pyeconet.equipment import EquipmentType
|
||||
|
||||
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import ENERGY_KILO_WATT_HOUR, PERCENTAGE, VOLUME_GALLONS
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import EcoNetEntity
|
||||
from .const import DOMAIN, EQUIPMENT
|
||||
|
@ -44,7 +47,9 @@ SENSOR_NAMES_TO_UNIT_OF_MEASUREMENT = {
|
|||
}
|
||||
|
||||
|
||||
async def async_setup_entry(hass, entry, async_add_entities):
|
||||
async def async_setup_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up EcoNet sensor based on a config entry."""
|
||||
|
||||
equipment = hass.data[DOMAIN][EQUIPMENT][entry.entry_id]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue