Improve typing in nest legacy platforms (#87071)
This commit is contained in:
parent
2412f7d266
commit
afa55156d6
4 changed files with 24 additions and 32 deletions
|
@ -8,6 +8,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntity,
|
||||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
CONF_MONITORED_CONDITIONS,
|
||||
CONF_SENSORS,
|
||||
|
@ -15,6 +16,8 @@ from homeassistant.const import (
|
|||
STATE_OFF,
|
||||
UnitOfTemperature,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from . import NestSensorDevice
|
||||
from .const import DATA_NEST, DATA_NEST_CONFIG
|
||||
|
@ -75,14 +78,9 @@ _SENSOR_TYPES_DEPRECATED = SENSOR_TYPES_DEPRECATED + DEPRECATED_WEATHER_VARS
|
|||
_LOGGER = logging.getLogger(__name__)
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_entities, discovery_info=None):
|
||||
"""Set up the Nest Sensor.
|
||||
|
||||
No longer used.
|
||||
"""
|
||||
|
||||
|
||||
async def async_setup_legacy_entry(hass, entry, async_add_entities) -> None:
|
||||
async def async_setup_legacy_entry(
|
||||
hass: HomeAssistant, entry: ConfigEntry, async_add_entities: AddEntitiesCallback
|
||||
) -> None:
|
||||
"""Set up a Nest sensor based on a config entry."""
|
||||
nest = hass.data[DATA_NEST]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue