Updated apps

This commit is contained in:
2026-07-20 22:52:35 -04:00
parent 28a8cb98f6
commit a0c3271743
1164 changed files with 94781 additions and 6892 deletions
@@ -0,0 +1,42 @@
"""Spook - Your homie. Sub-integration symlinking helpers."""
from __future__ import annotations
from pathlib import Path
from typing import TYPE_CHECKING
from .const import DOMAIN, LOGGER
if TYPE_CHECKING:
from homeassistant.core import HomeAssistant
def link_sub_integrations(hass: HomeAssistant) -> bool:
"""Link Spook sub integrations."""
LOGGER.debug("Linking up Spook sub integrations")
changes = False
for manifest in Path(__file__).parent.rglob("integrations/*/manifest.json"):
LOGGER.debug("Linking Spook sub integration: %s", manifest.parent.name)
dest = Path(hass.config.config_dir) / "custom_components" / manifest.parent.name
if not dest.exists():
src = (
Path(hass.config.config_dir)
/ "custom_components"
/ DOMAIN
/ "integrations"
/ manifest.parent.name
)
dest.symlink_to(src)
changes = True
return changes
def unlink_sub_integrations(hass: HomeAssistant) -> None:
"""Unlink Spook sub integrations."""
LOGGER.debug("Unlinking Spook sub integrations")
for manifest in Path(__file__).parent.rglob("integrations/*/manifest.json"):
LOGGER.debug("Unlinking Spook sub integration: %s", manifest.parent.name)
dest = Path(hass.config.config_dir) / "custom_components" / manifest.parent.name
if dest.exists():
dest.unlink()