forked from home-assistant/core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename the safe_mode integration to recovery_mode (home-assistant#102581
- Loading branch information
1 parent
6372bc3
commit b953f29
Showing
10 changed files
with
26 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
...ssistant/components/safe_mode/__init__.py → ...tant/components/recovery_mode/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
"""The Safe Mode integration.""" | ||
"""The Recovery Mode integration.""" | ||
from homeassistant.components import persistent_notification | ||
from homeassistant.core import HomeAssistant | ||
from homeassistant.helpers import config_validation as cv | ||
from homeassistant.helpers.typing import ConfigType | ||
|
||
DOMAIN = "safe_mode" | ||
DOMAIN = "recovery_mode" | ||
|
||
CONFIG_SCHEMA = cv.empty_config_schema(DOMAIN) | ||
|
||
|
||
async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: | ||
"""Set up the Safe Mode component.""" | ||
"""Set up the Recovery Mode component.""" | ||
persistent_notification.async_create( | ||
hass, | ||
( | ||
"Home Assistant is running in safe mode. Check [the error" | ||
"Home Assistant is running in recovery mode. Check [the error" | ||
" log](/config/logs) to see what went wrong." | ||
), | ||
"Safe Mode", | ||
"Recovery Mode", | ||
) | ||
return True |
6 changes: 3 additions & 3 deletions
6
...istant/components/safe_mode/manifest.json → ...nt/components/recovery_mode/manifest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
{ | ||
"domain": "safe_mode", | ||
"name": "Safe Mode", | ||
"domain": "recovery_mode", | ||
"name": "Recovery Mode", | ||
"codeowners": ["@home-assistant/core"], | ||
"config_flow": false, | ||
"dependencies": ["frontend", "persistent_notification", "cloud"], | ||
"documentation": "https://www.home-assistant.io/integrations/safe_mode", | ||
"documentation": "https://www.home-assistant.io/integrations/recovery_mode", | ||
"integration_type": "system", | ||
"quality_scale": "internal" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"""Tests for the Recovery Mode integration.""" |
6 changes: 3 additions & 3 deletions
6
tests/components/safe_mode/test_init.py → tests/components/recovery_mode/test_init.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
"""Tests for safe mode integration.""" | ||
"""Tests for the Recovery Mode integration.""" | ||
from homeassistant.core import HomeAssistant | ||
from homeassistant.setup import async_setup_component | ||
|
||
from tests.common import async_get_persistent_notifications | ||
|
||
|
||
async def test_works(hass: HomeAssistant) -> None: | ||
"""Test safe mode works.""" | ||
assert await async_setup_component(hass, "safe_mode", {}) | ||
"""Test Recovery Mode works.""" | ||
assert await async_setup_component(hass, "recovery_mode", {}) | ||
await hass.async_block_till_done() | ||
notifications = async_get_persistent_notifications(hass) | ||
assert len(notifications) == 1 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters