add active window sensor in ui

pull/9/head
sleevezipper 4 years ago
parent a58de7eb1f
commit 1253d8fab9

@ -20,9 +20,15 @@ Note: You'll get a Windows Smartscreen warning because the code was self signed.
Alternatively, you can find releases on GitHub [here](https://github.com/sleevezipper/hass-workstation-service/releases).
### Updating
The app checks for updates on startup. If an update is available you will be prompted to install.
## Sensors
The application provides several sensors.
The application provides several sensors. Sensors can be configured with a name and this name will be used in the MQTT topic like this: `homeassistant/sensor/{Name}/state`. Sensors will expose themselves through [MQTT discovery](https://www.home-assistant.io/docs/mqtt/discovery/) and will automatically appear in Home assistant or any other platform that supports this type of configuration.
Sensors publish their state on their own interval which you can configure and only publish when the state changes.
### UserNotificationState
@ -38,6 +44,10 @@ This sensor watches the UserNotificationState. This is normally used in applicat
|QuietTime|Introduced in Windows 7. The current user is in "quiet time", which is the first hour after a new user logs into his or her account for the first time. During this time, most notifications should not be sent or shown. This lets a user become accustomed to a new computer system without those distractions. Quiet time also occurs for each user after an operating system upgrade or clean installation.|
|RunningWindowsStoreApp|A Windows Store app is running.|
### ActiveWindow
This sensor exposes the name of the currently focused window.
### CPULoad
This sensor checks the current CPU load. It averages the load on all logical cores every second and rounds the output to two decimals.

@ -94,6 +94,12 @@ namespace UserInterface.Views
item.ShowQueryInput = false;
item.UpdateInterval = 10;
break;
case AvailableSensors.ActiveWindowSensor:
item.Description = "This sensor exposes the name of the currently active window.";
item.MoreInfoLink = "https://github.com/sleevezipper/hass-workstation-service#activewindow";
item.ShowQueryInput = false;
item.UpdateInterval = 5;
break;
default:
item.Description = null;
item.MoreInfoLink = null;

Loading…
Cancel
Save