Support for Shelly Binary Input Sensors (#43313)
Co-authored-by: Maciej Bieniek <bieniu@users.noreply.github.com> Co-authored-by: Paulus Schoutsen <balloob@gmail.com>
This commit is contained in:
parent
3dbfd2cb70
commit
982624b3ac
6 changed files with 73 additions and 55 deletions
|
@ -7,7 +7,7 @@ from homeassistant.core import callback
|
|||
from . import ShellyDeviceWrapper
|
||||
from .const import COAP, DATA_CONFIG_ENTRY, DOMAIN
|
||||
from .entity import ShellyBlockEntity
|
||||
from .utils import async_remove_entity_by_domain
|
||||
from .utils import async_remove_shelly_entity
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
|
@ -32,11 +32,10 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||
unique_id = (
|
||||
f'{wrapper.device.shelly["mac"]}-{block.type}_{block.channel}'
|
||||
)
|
||||
await async_remove_entity_by_domain(
|
||||
await async_remove_shelly_entity(
|
||||
hass,
|
||||
"light",
|
||||
unique_id,
|
||||
config_entry.entry_id,
|
||||
)
|
||||
|
||||
if not relay_blocks:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue