mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-12-24 20:35:55 +00:00
Clarify message when addon unavailable (#4098)
This commit is contained in:
@@ -8,6 +8,7 @@ from dbus_fast.introspection import Method, Property, Signal
|
||||
|
||||
from supervisor.dbus.interface import DBusInterface, DBusInterfaceProxy
|
||||
from supervisor.utils.dbus import DBUS_INTERFACE_PROPERTIES
|
||||
from supervisor.utils.yaml import read_yaml_file
|
||||
|
||||
|
||||
def get_dbus_name(intr_list: list[Method | Property | Signal], snake_case: str) -> str:
|
||||
@@ -71,6 +72,12 @@ def load_json_fixture(filename: str) -> Any:
|
||||
return json.loads(path.read_text(encoding="utf-8"))
|
||||
|
||||
|
||||
def load_yaml_fixture(filename: str) -> Any:
|
||||
"""Load a YAML fixture."""
|
||||
path = Path(Path(__file__).parent.joinpath("fixtures"), filename)
|
||||
return read_yaml_file(path)
|
||||
|
||||
|
||||
def load_fixture(filename: str) -> str:
|
||||
"""Load a fixture."""
|
||||
path = Path(Path(__file__).parent.joinpath("fixtures"), filename)
|
||||
|
||||
Reference in New Issue
Block a user