mirror of
https://github.com/sudoxnym/sleepd.git
synced 2026-04-14 19:47:29 +00:00
Add files via upload
This commit is contained in:
parent
8929718dc9
commit
61ab71c61e
1 changed files with 6 additions and 8 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
import asyncio
|
||||||
import logging
|
import logging
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.core import HomeAssistant
|
from homeassistant.core import HomeAssistant
|
||||||
|
|
@ -22,12 +23,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||||
|
|
||||||
_logger.info(f"hass.data[DOMAIN] after adding entry data: {hass.data[DOMAIN]}")
|
_logger.info(f"hass.data[DOMAIN] after adding entry data: {hass.data[DOMAIN]}")
|
||||||
|
|
||||||
# Forward the setup to the sensor and button platforms
|
# Forward the setup to the sensor and button platforms using the new method.
|
||||||
for platform in ["sensor", "button"]:
|
# Note: async_forward_entry_setups must always be awaited.
|
||||||
_logger.info(f"Forwarding setup to {platform} platform")
|
await hass.config_entries.async_forward_entry_setups(entry, ["sensor", "button"])
|
||||||
hass.async_create_task(
|
|
||||||
await hass.config_entries.async_forward_entry_setup(entry, platform)
|
|
||||||
)
|
|
||||||
|
|
||||||
_logger.info(f"hass.data[DOMAIN] before async_setup_services: {hass.data[DOMAIN]}")
|
_logger.info(f"hass.data[DOMAIN] before async_setup_services: {hass.data[DOMAIN]}")
|
||||||
|
|
||||||
|
|
@ -36,7 +34,7 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry):
|
||||||
await async_setup_services(hass)
|
await async_setup_services(hass)
|
||||||
_logger.info("Finished setup of services")
|
_logger.info("Finished setup of services")
|
||||||
|
|
||||||
_logger.info(f"hass.data[DOMAIN] after setup of services: {hass.data[DOMAIN]}") # New log
|
_logger.info(f"hass.data[DOMAIN] after setup of services: {hass.data[DOMAIN]}")
|
||||||
|
|
||||||
async def reload_entry():
|
async def reload_entry():
|
||||||
_logger.info("Reloading entry")
|
_logger.info("Reloading entry")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue