replace deprecated platform setup
This commit is contained in:
parent
2c01fb2de4
commit
b89b3b12c8
|
@ -1,5 +1,6 @@
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
from homeassistant.const import Platform
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
from .reos_api import ReosApi
|
from .reos_api import ReosApi
|
||||||
|
@ -46,7 +47,5 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||||
hass.data[DOMAIN][username]["coordinator"] = coordinator
|
hass.data[DOMAIN][username]["coordinator"] = coordinator
|
||||||
await coordinator.async_config_entry_first_refresh()
|
await coordinator.async_config_entry_first_refresh()
|
||||||
|
|
||||||
await hass.config_entries.async_forward_entry_setup(entry, "button")
|
await hass.config_entries.async_forward_entry_setups(entry, [Platform.BUTTON, Platform.SENSOR, Platform.BINARY_SENSOR])
|
||||||
await hass.config_entries.async_forward_entry_setup(entry, "sensor")
|
|
||||||
await hass.config_entries.async_forward_entry_setup(entry, "binary_sensor")
|
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in New Issue