-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix duplicazione sensore competizioni
- Loading branch information
Showing
3 changed files
with
30 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
import logging | ||
from homeassistant.config_entries import ConfigEntry | ||
from homeassistant.core import HomeAssistant | ||
|
||
from .const import DOMAIN | ||
|
||
_LOGGER = logging.getLogger(__name__) | ||
|
||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool: | ||
"""Setup calcio_live from a config entry.""" | ||
# Avvia il forward delle piattaforme in modo asincrono | ||
hass.async_create_task( | ||
hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) | ||
) | ||
return True | ||
|
||
# Inizializza hass.data[DOMAIN] se non è già stato inizializzato | ||
if DOMAIN not in hass.data: | ||
hass.data[DOMAIN] = {} | ||
|
||
# Avvia la configurazione delle piattaforme come "sensor" | ||
await hass.config_entries.async_forward_entry_setups(entry, ["sensor"]) | ||
|
||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters