2020-12-22 20:42:37 +00:00
|
|
|
"""Support for Nest binary sensors that dispatches between API versions."""
|
2016-12-03 17:26:47 +00:00
|
|
|
|
2020-12-22 20:42:37 +00:00
|
|
|
from homeassistant.config_entries import ConfigEntry
|
|
|
|
from homeassistant.helpers.typing import HomeAssistantType
|
2016-01-14 17:48:24 +00:00
|
|
|
|
2020-12-22 20:42:37 +00:00
|
|
|
from .const import DATA_SDM
|
2020-12-31 18:22:24 +00:00
|
|
|
from .legacy.binary_sensor import async_setup_legacy_entry
|
2019-03-21 05:56:46 +00:00
|
|
|
|
2019-02-14 04:35:12 +00:00
|
|
|
|
2020-12-22 20:42:37 +00:00
|
|
|
async def async_setup_entry(
|
|
|
|
hass: HomeAssistantType, entry: ConfigEntry, async_add_entities
|
|
|
|
) -> None:
|
|
|
|
"""Set up the binary sensors."""
|
|
|
|
assert DATA_SDM not in entry.data
|
|
|
|
await async_setup_legacy_entry(hass, entry, async_add_entities)
|