home-assistant-custom-components.spook: 4.0.1 -> 5.0.0
https://github.com/frenck/spook/releases/tag/v5.0.0
This commit is contained in:
@@ -10,13 +10,13 @@
|
||||
buildHomeAssistantComponent rec {
|
||||
owner = "frenck";
|
||||
domain = "spook";
|
||||
version = "4.0.1";
|
||||
version = "5.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
inherit owner;
|
||||
repo = domain;
|
||||
tag = "v${version}";
|
||||
hash = "sha256-0IihrhATgraGmuMRnrbGTUrtlXAR+CooENSIKSWIknY=";
|
||||
hash = "sha256-tIVEI5oZcvI0uyCQfajb1WVldkx7aQF8gV0UBWYPUnI=";
|
||||
};
|
||||
|
||||
patches = [ ./remove-sub-integration-symlink-hack.patch ];
|
||||
|
||||
+5
-55
@@ -1,17 +1,8 @@
|
||||
diff --git a/custom_components/spook/__init__.py b/custom_components/spook/__init__.py
|
||||
index 1abc79d..68d48d1 100644
|
||||
index 4223fac..6891ee9 100644
|
||||
--- a/custom_components/spook/__init__.py
|
||||
+++ b/custom_components/spook/__init__.py
|
||||
@@ -22,8 +22,6 @@ from .services import SpookServiceManager
|
||||
from .util import (
|
||||
async_forward_setup_entry,
|
||||
async_setup_all_entity_ids_cache_invalidation,
|
||||
- link_sub_integrations,
|
||||
- unlink_sub_integrations,
|
||||
)
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -35,48 +33,6 @@ if TYPE_CHECKING:
|
||||
@@ -33,49 +33,6 @@ if TYPE_CHECKING:
|
||||
|
||||
async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
"""Set up from a config entry."""
|
||||
@@ -57,53 +48,12 @@ index 1abc79d..68d48d1 100644
|
||||
- severity=ir.IssueSeverity.WARNING,
|
||||
- translation_key="restart_required",
|
||||
- )
|
||||
|
||||
-
|
||||
# Forward async_setup_entry to ectoplasms
|
||||
await async_forward_setup_entry(hass, entry)
|
||||
@@ -131,4 +87,3 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
@@ -117,4 +74,3 @@ async def async_unload_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
|
||||
|
||||
async def async_remove_entry(hass: HomeAssistant, _: ConfigEntry) -> None:
|
||||
"""Remove a config entry."""
|
||||
- await hass.async_add_executor_job(unlink_sub_integrations, hass)
|
||||
diff --git a/custom_components/spook/util.py b/custom_components/spook/util.py
|
||||
index 6aea27c..1437913 100644
|
||||
--- a/custom_components/spook/util.py
|
||||
+++ b/custom_components/spook/util.py
|
||||
@@ -284,37 +284,6 @@ async def async_forward_platform_entry_setups_to_ectoplasm(
|
||||
)
|
||||
|
||||
|
||||
-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()
|
||||
-
|
||||
-
|
||||
@callback
|
||||
def async_get_all_area_ids(hass: HomeAssistant) -> set[str]:
|
||||
"""Return all area IDs, known to Home Assistant."""
|
||||
|
||||
Reference in New Issue
Block a user