Extend safe mode (#31927)
* Extend safe mode * Add safe mode boolean to config JSON output and default Lovelace * Add safe mode to frontend * Update accent color
This commit is contained in:
parent
245482d802
commit
beee1298c5
12 changed files with 131 additions and 17 deletions
|
@ -126,6 +126,16 @@ async def test_themes_api(hass, hass_ws_client):
|
|||
assert msg["result"]["default_theme"] == "default"
|
||||
assert msg["result"]["themes"] == {"happy": {"primary-color": "red"}}
|
||||
|
||||
# safe mode
|
||||
hass.config.safe_mode = True
|
||||
await client.send_json({"id": 6, "type": "frontend/get_themes"})
|
||||
msg = await client.receive_json()
|
||||
|
||||
assert msg["result"]["default_theme"] == "safe_mode"
|
||||
assert msg["result"]["themes"] == {
|
||||
"safe_mode": {"primary-color": "#db4437", "accent-color": "#eeee02"}
|
||||
}
|
||||
|
||||
|
||||
async def test_themes_set_theme(hass, hass_ws_client):
|
||||
"""Test frontend.set_theme service."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue