Adjust egardia

This commit is contained in:
epenet 2022-01-06 20:57:23 +00:00
parent 2749045e13
commit ff7b0d6100

View file

@ -12,6 +12,7 @@ from homeassistant.const import (
CONF_PORT, CONF_PORT,
CONF_USERNAME, CONF_USERNAME,
EVENT_HOMEASSISTANT_STOP, EVENT_HOMEASSISTANT_STOP,
Platform,
) )
from homeassistant.core import HomeAssistant from homeassistant.core import HomeAssistant
from homeassistant.helpers import discovery from homeassistant.helpers import discovery
@ -129,13 +130,13 @@ def setup(hass: HomeAssistant, config: ConfigType) -> bool:
return False return False
discovery.load_platform( discovery.load_platform(
hass, "alarm_control_panel", DOMAIN, discovered=conf, hass_config=config hass, Platform.ALARM_CONTROL_PANEL, DOMAIN, discovered=conf, hass_config=config
) )
# Get the sensors from the device and add those # Get the sensors from the device and add those
sensors = device.getsensors() sensors = device.getsensors()
discovery.load_platform( discovery.load_platform(
hass, "binary_sensor", DOMAIN, {ATTR_DISCOVER_DEVICES: sensors}, config hass, Platform.BINARY_SENSOR, DOMAIN, {ATTR_DISCOVER_DEVICES: sensors}, config
) )
return True return True