2019-04-03 15:40:03 +00:00
|
|
|
"""Support for Xiaomi Mi Flora BLE plant sensor."""
|
2021-08-23 20:30:01 +00:00
|
|
|
from __future__ import annotations
|
2020-03-22 13:00:09 +00:00
|
|
|
|
2022-07-26 15:35:47 +00:00
|
|
|
from homeassistant.components.sensor import PLATFORM_SCHEMA_BASE
|
|
|
|
from homeassistant.core import HomeAssistant
|
2022-01-03 18:09:36 +00:00
|
|
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
2022-08-25 13:33:05 +00:00
|
|
|
from homeassistant.helpers.issue_registry import IssueSeverity, async_create_issue
|
2022-01-03 18:09:36 +00:00
|
|
|
from homeassistant.helpers.typing import ConfigType, DiscoveryInfoType
|
2016-09-14 05:37:57 +00:00
|
|
|
|
2022-07-26 15:35:47 +00:00
|
|
|
PLATFORM_SCHEMA = PLATFORM_SCHEMA_BASE
|
2019-07-31 19:25:30 +00:00
|
|
|
|
|
|
|
|
2022-01-03 18:09:36 +00:00
|
|
|
async def async_setup_platform(
|
|
|
|
hass: HomeAssistant,
|
|
|
|
config: ConfigType,
|
|
|
|
async_add_entities: AddEntitiesCallback,
|
|
|
|
discovery_info: DiscoveryInfoType | None = None,
|
|
|
|
) -> None:
|
2017-04-24 03:41:09 +00:00
|
|
|
"""Set up the MiFlora sensor."""
|
2022-07-26 15:35:47 +00:00
|
|
|
async_create_issue(
|
|
|
|
hass,
|
|
|
|
"miflora",
|
|
|
|
"replaced",
|
|
|
|
breaks_in_ha_version="2022.8.0",
|
|
|
|
is_fixable=False,
|
|
|
|
severity=IssueSeverity.ERROR,
|
|
|
|
translation_key="replaced",
|
|
|
|
learn_more_url="https://www.home-assistant.io/integrations/xiaomi_ble/",
|
2019-07-31 19:25:30 +00:00
|
|
|
)
|