mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 11:17:21 +00:00
Add addon selector (#46789)
This commit is contained in:
parent
0ef16dd563
commit
11a89bc3ac
@ -1,110 +1,101 @@
|
|||||||
addon_install:
|
|
||||||
description: Install a Hass.io docker add-on.
|
|
||||||
fields:
|
|
||||||
addon:
|
|
||||||
description: The add-on slug.
|
|
||||||
example: core_ssh
|
|
||||||
version:
|
|
||||||
description: Optional or it will be use the latest version.
|
|
||||||
example: "0.2"
|
|
||||||
|
|
||||||
addon_start:
|
addon_start:
|
||||||
description: Start a Hass.io docker add-on.
|
name: Start add-on
|
||||||
|
description: Start add-on.
|
||||||
fields:
|
fields:
|
||||||
addon:
|
addon:
|
||||||
|
name: Add-on
|
||||||
|
required: true
|
||||||
description: The add-on slug.
|
description: The add-on slug.
|
||||||
example: core_ssh
|
example: core_ssh
|
||||||
|
selector:
|
||||||
|
addon:
|
||||||
|
|
||||||
addon_restart:
|
addon_restart:
|
||||||
description: Restart a Hass.io docker add-on.
|
name: Restart add-on.
|
||||||
|
description: Restart add-on.
|
||||||
fields:
|
fields:
|
||||||
addon:
|
addon:
|
||||||
|
name: Add-on
|
||||||
|
required: true
|
||||||
description: The add-on slug.
|
description: The add-on slug.
|
||||||
example: core_ssh
|
example: core_ssh
|
||||||
|
selector:
|
||||||
|
addon:
|
||||||
|
|
||||||
addon_stdin:
|
addon_stdin:
|
||||||
description: Write data to a Hass.io docker add-on stdin .
|
name: Write data to add-on stdin.
|
||||||
|
description: Write data to add-on stdin.
|
||||||
fields:
|
fields:
|
||||||
addon:
|
addon:
|
||||||
|
name: Add-on
|
||||||
|
required: true
|
||||||
description: The add-on slug.
|
description: The add-on slug.
|
||||||
example: core_ssh
|
example: core_ssh
|
||||||
|
selector:
|
||||||
|
addon:
|
||||||
|
|
||||||
addon_stop:
|
addon_stop:
|
||||||
description: Stop a Hass.io docker add-on.
|
name: Stop add-on.
|
||||||
|
description: Stop add-on.
|
||||||
fields:
|
fields:
|
||||||
addon:
|
addon:
|
||||||
|
name: Add-on
|
||||||
|
required: true
|
||||||
description: The add-on slug.
|
description: The add-on slug.
|
||||||
example: core_ssh
|
example: core_ssh
|
||||||
|
selector:
|
||||||
addon_uninstall:
|
|
||||||
description: Uninstall a Hass.io docker add-on.
|
|
||||||
fields:
|
|
||||||
addon:
|
addon:
|
||||||
description: The add-on slug.
|
|
||||||
example: core_ssh
|
|
||||||
|
|
||||||
addon_update:
|
|
||||||
description: Update a Hass.io docker add-on.
|
|
||||||
fields:
|
|
||||||
addon:
|
|
||||||
description: The add-on slug.
|
|
||||||
example: core_ssh
|
|
||||||
version:
|
|
||||||
description: Optional or it will be use the latest version.
|
|
||||||
example: "0.2"
|
|
||||||
|
|
||||||
homeassistant_update:
|
|
||||||
description: Update the Home Assistant docker image.
|
|
||||||
fields:
|
|
||||||
version:
|
|
||||||
description: Optional or it will be use the latest version.
|
|
||||||
example: 0.40.1
|
|
||||||
|
|
||||||
host_reboot:
|
host_reboot:
|
||||||
|
name: Reboot the host system.
|
||||||
description: Reboot the host system.
|
description: Reboot the host system.
|
||||||
|
|
||||||
host_shutdown:
|
host_shutdown:
|
||||||
|
name: Poweroff the host system.
|
||||||
description: Poweroff the host system.
|
description: Poweroff the host system.
|
||||||
|
|
||||||
host_update:
|
|
||||||
description: Update the host system.
|
|
||||||
fields:
|
|
||||||
version:
|
|
||||||
description: Optional or it will be use the latest version.
|
|
||||||
example: "0.3"
|
|
||||||
|
|
||||||
snapshot_full:
|
snapshot_full:
|
||||||
|
name: Create a full snapshot.
|
||||||
description: Create a full snapshot.
|
description: Create a full snapshot.
|
||||||
fields:
|
fields:
|
||||||
name:
|
name:
|
||||||
|
name: Name
|
||||||
description: Optional or it will be the current date and time.
|
description: Optional or it will be the current date and time.
|
||||||
example: "Snapshot 1"
|
example: "Snapshot 1"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
password:
|
password:
|
||||||
|
name: Password
|
||||||
description: Optional password.
|
description: Optional password.
|
||||||
example: "password"
|
example: "password"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
|
|
||||||
snapshot_partial:
|
snapshot_partial:
|
||||||
|
name: Create a partial snapshot.
|
||||||
description: Create a partial snapshot.
|
description: Create a partial snapshot.
|
||||||
fields:
|
fields:
|
||||||
addons:
|
addons:
|
||||||
|
name: Add-ons
|
||||||
description: Optional list of addon slugs.
|
description: Optional list of addon slugs.
|
||||||
example: ["core_ssh", "core_samba", "core_mosquitto"]
|
example: ["core_ssh", "core_samba", "core_mosquitto"]
|
||||||
|
selector:
|
||||||
|
object:
|
||||||
folders:
|
folders:
|
||||||
|
name: Folders
|
||||||
description: Optional list of directories.
|
description: Optional list of directories.
|
||||||
example: ["homeassistant", "share"]
|
example: ["homeassistant", "share"]
|
||||||
|
selector:
|
||||||
|
object:
|
||||||
name:
|
name:
|
||||||
|
name: Name
|
||||||
description: Optional or it will be the current date and time.
|
description: Optional or it will be the current date and time.
|
||||||
example: "Partial Snapshot 1"
|
example: "Partial Snapshot 1"
|
||||||
|
selector:
|
||||||
|
text:
|
||||||
password:
|
password:
|
||||||
|
name: Password
|
||||||
description: Optional password.
|
description: Optional password.
|
||||||
example: "password"
|
example: "password"
|
||||||
|
selector:
|
||||||
supervisor_reload:
|
text:
|
||||||
description: Reload the Hass.io supervisor.
|
|
||||||
|
|
||||||
supervisor_update:
|
|
||||||
description: Update the Hass.io supervisor.
|
|
||||||
fields:
|
|
||||||
version:
|
|
||||||
description: Optional or it will be use the latest version.
|
|
||||||
example: "0.3"
|
|
||||||
|
@ -116,6 +116,13 @@ class NumberSelector(Selector):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@SELECTORS.register("addon")
|
||||||
|
class AddonSelector(Selector):
|
||||||
|
"""Selector of a add-on."""
|
||||||
|
|
||||||
|
CONFIG_SCHEMA = vol.Schema({})
|
||||||
|
|
||||||
|
|
||||||
@SELECTORS.register("boolean")
|
@SELECTORS.register("boolean")
|
||||||
class BooleanSelector(Selector):
|
class BooleanSelector(Selector):
|
||||||
"""Selector of a boolean value."""
|
"""Selector of a boolean value."""
|
||||||
|
@ -118,6 +118,15 @@ def test_number_selector_schema(schema):
|
|||||||
selector.validate_selector({"number": schema})
|
selector.validate_selector({"number": schema})
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize(
|
||||||
|
"schema",
|
||||||
|
({},),
|
||||||
|
)
|
||||||
|
def test_addon_selector_schema(schema):
|
||||||
|
"""Test add-on selector."""
|
||||||
|
selector.validate_selector({"addon": schema})
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"schema",
|
"schema",
|
||||||
({},),
|
({},),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user