Skip to content

Commit c8eb553

Browse files
committed
Add support for system health
1 parent 05c1ddb commit c8eb553

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

homeassistant_cli/plugins/system.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import click
55
from homeassistant_cli.cli import pass_context
66
import homeassistant_cli.remote as api
7+
from homeassistant_cli.config import Configuration
78

89
_LOGGING = logging.getLogger(__name__)
910

@@ -19,3 +20,12 @@ def cli(ctx):
1920
def log(ctx):
2021
"""Get errors from Home Assistant."""
2122
click.echo(api.get_raw_error_log(ctx))
23+
24+
25+
@cli.command()
26+
@pass_context
27+
def health(ctx: Configuration):
28+
"""Get system health from Home Assistant."""
29+
frame = {'type': 'system_health/info'}
30+
31+
click.echo(api.wsapi(ctx, frame, False))

0 commit comments

Comments
 (0)