From fde907c5389b1bf4577e24fc86e32dbe9ac88c01 Mon Sep 17 00:00:00 2001 From: eshy <322731+eshy@users.noreply.github.com> Date: Wed, 15 Jan 2020 13:57:57 -0800 Subject: [PATCH] Update README.md --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 82c8cb4..692cb9b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,31 @@ # HomeAssistantWindowsService A windows service to trigger scenes in Home Assistant when the computer is suspended or resumes + +This is a small service I created to turn off my monitors when my laptop goes to sleep and turn them back on when it wakes up. + +The service uses the OnPowerEvent's ResumeSuspend and Suspent power statuses to trigger scenes with HomeAssistant's REST Api. + +#### Installing the Service +Download the latest release and extract it to a local folder + +Open a command prompt or powershell window and use InstallUtil to install the service + +C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe -i D:\HAService\HomeAssistantPowerStateService.exe + +#### Using the Service + +There are four settings you need to update in the HomeAssistantPowerStateService.config file + +##### BaseUrl +The Home Assistant URL + +##### Token +A Long-Lived Access Token (create one from your profile page in Home Assistant) + +##### SuspendScene +The scene to trigger when the computer is suspended + +##### ResumeScene +The scene to trigger when the computer wakes up + +After updating the config file start the service and your scenes should be triggered.