Add Shelly support for REST sensors (#40429)
This commit is contained in:
parent
403514ccb3
commit
d8b067ebf9
9 changed files with 311 additions and 16 deletions
|
@ -5,14 +5,14 @@ from homeassistant.components.switch import SwitchEntity
|
|||
from homeassistant.core import callback
|
||||
|
||||
from . import ShellyDeviceWrapper
|
||||
from .const import DATA_CONFIG_ENTRY, DOMAIN
|
||||
from .const import COAP, DATA_CONFIG_ENTRY, DOMAIN
|
||||
from .entity import ShellyBlockEntity
|
||||
from .utils import async_remove_entity_by_domain
|
||||
|
||||
|
||||
async def async_setup_entry(hass, config_entry, async_add_entities):
|
||||
"""Set up switches for device."""
|
||||
wrapper = hass.data[DOMAIN][DATA_CONFIG_ENTRY][config_entry.entry_id]
|
||||
wrapper = hass.data[DOMAIN][DATA_CONFIG_ENTRY][config_entry.entry_id][COAP]
|
||||
|
||||
# In roller mode the relay blocks exist but do not contain required info
|
||||
if (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue