208 files

This commit is contained in:
Home Assistant Version Control
2026-10-07 02:49:21 +00:00
parent a7107ecbe1
commit cfd0d40c8e
208 changed files with 5434 additions and 901 deletions
@@ -4,8 +4,10 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import voluptuous as vol
from homeassistant.components.repairs import DOMAIN
from homeassistant.helpers import issue_registry as ir
from homeassistant.helpers import config_validation as cv, issue_registry as ir
from ....services import AbstractSpookAdminService
@@ -19,8 +21,20 @@ class SpookService(AbstractSpookAdminService):
domain = DOMAIN
service = "ignore_all"
async def async_handle_service(self, _: ServiceCall) -> None:
schema = {
# Left out, every issue. Named, only the issues those integrations
# raised: HACS nagging for a restart after every update, for example,
# without taking anything else down with it. Named, it has to name
# something: an empty list from a template that found nothing must
# not turn into every issue there is.
vol.Optional("domain"): vol.All(cv.ensure_list, [cv.string], vol.Length(min=1)),
}
async def async_handle_service(self, call: ServiceCall) -> None:
"""Handle the service call."""
domains = set(call.data.get("domain", []))
issue_registry = ir.async_get(self.hass)
for domain, issue_id in issue_registry.issues:
if domains and domain not in domains:
continue
issue_registry.async_ignore(domain, issue_id, ignore=True)
@@ -4,8 +4,10 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import voluptuous as vol
from homeassistant.components.repairs import DOMAIN
from homeassistant.helpers import issue_registry as ir
from homeassistant.helpers import config_validation as cv, issue_registry as ir
from ....services import AbstractSpookAdminService
@@ -19,8 +21,20 @@ class SpookService(AbstractSpookAdminService):
domain = DOMAIN
service = "unignore_all"
async def async_handle_service(self, _: ServiceCall) -> None:
schema = {
# Left out, every issue. Named, only the issues those integrations
# raised: HACS nagging for a restart after every update, for example,
# without taking anything else down with it. Named, it has to name
# something: an empty list from a template that found nothing must
# not turn into every issue there is.
vol.Optional("domain"): vol.All(cv.ensure_list, [cv.string], vol.Length(min=1)),
}
async def async_handle_service(self, call: ServiceCall) -> None:
"""Handle the service call."""
domains = set(call.data.get("domain", []))
issue_registry = ir.async_get(self.hass)
for domain, issue_id in issue_registry.issues:
if domains and domain not in domains:
continue
issue_registry.async_ignore(domain, issue_id, ignore=False)