From 64565b2ba8fb10985f4926b672ad95e5f70858d3 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Wed, 25 Oct 2023 22:05:12 +0200 Subject: [PATCH] Add Home Assistant restart safe_mode support --- .../spook/ectoplasms/homeassistant/services/restart.py | 1 + custom_components/spook/services.yaml | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/custom_components/spook/ectoplasms/homeassistant/services/restart.py b/custom_components/spook/ectoplasms/homeassistant/services/restart.py index 2a434409..8a6fa069 100644 --- a/custom_components/spook/ectoplasms/homeassistant/services/restart.py +++ b/custom_components/spook/ectoplasms/homeassistant/services/restart.py @@ -27,6 +27,7 @@ class SpookService(AbstractSpookAdminService, ReplaceExistingService): domain = DOMAIN service = "restart" schema = { + vol.Optional("safe_mode", default=False): cv.boolean, vol.Optional("force", default=False): cv.boolean, } diff --git a/custom_components/spook/services.yaml b/custom_components/spook/services.yaml index 671f7953..df2ab1cf 100644 --- a/custom_components/spook/services.yaml +++ b/custom_components/spook/services.yaml @@ -330,6 +330,14 @@ homeassistant_restart: name: Restart 👻 description: Restart the Home Assistant service. fields: + safe_mode: + name: Safe mode + description: >- + If the restart should be done in safe mode. This will disable all + custom integrations and frontend modules. + required: false + selector: + boolean: force: name: Force restart description: >-