|
|
@@ -5,17 +5,12 @@ from .generic.binary_sensor import TuyaLocalBinarySensor
|
|
|
from .helpers.config import async_tuya_setup_platform
|
|
|
|
|
|
|
|
|
-async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
|
|
|
- """Set up the sensor device according to it's type."""
|
|
|
+async def async_setup_entry(hass, config_entry, async_add_entities):
|
|
|
+ config = {**config_entry.data, **config_entry.options}
|
|
|
await async_tuya_setup_platform(
|
|
|
hass,
|
|
|
async_add_entities,
|
|
|
- discovery_info,
|
|
|
+ config,
|
|
|
"binary_sensor",
|
|
|
TuyaLocalBinarySensor,
|
|
|
)
|
|
|
-
|
|
|
-
|
|
|
-async def async_setup_entry(hass, config_entry, async_add_entities):
|
|
|
- config = {**config_entry.data, **config_entry.options}
|
|
|
- await async_setup_platform(hass, {}, async_add_entities, config)
|