361 files
This commit is contained in:
@@ -5,9 +5,8 @@ from __future__ import annotations
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from homeassistant.components.binary_sensor import BinarySensorEntity
|
||||
from homeassistant.const import CONF_ENTITY_ID, STATE_ON, STATE_UNKNOWN
|
||||
from homeassistant.const import STATE_ON, STATE_UNKNOWN
|
||||
from homeassistant.core import HomeAssistant, State, callback
|
||||
from homeassistant.helpers import entity_registry as er
|
||||
|
||||
from .entity import InverseEntity
|
||||
|
||||
@@ -22,10 +21,8 @@ async def async_setup_entry(
|
||||
async_add_entities: AddEntitiesCallback,
|
||||
) -> None:
|
||||
"""Initialize inverse config entry."""
|
||||
er.async_validate_entity_id(
|
||||
er.async_get(hass),
|
||||
config_entry.options[CONF_ENTITY_ID],
|
||||
)
|
||||
# The source is resolved by the entity itself, which stays unavailable
|
||||
# rather than failing to set up when the source is not there.
|
||||
async_add_entities([InverseBinarySensor(hass, config_entry)])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user