LAB02-Research / HASS.Agent

Windows-based client for Home Assistant. Provides notifications, quick actions, commands, sensors and more.
https://hassagent.lab02-research.org
MIT License
1.6k stars 74 forks source link

Bug: WindowState always "Unknown" #354

Open Dustinhoefer opened 1 year ago

Dustinhoefer commented 1 year ago

Describe the bug A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Open Sensors Configuration
  2. Add a WindowState for window "Sensorc Configuration"
  3. Observe last Known Value is "Unknown"

Expected behavior Last Known Value should change to "maximized"

Windows 11

amadeo-alex commented 1 year ago

The sensor could do with an overhaul, the description and configuration option is a little misleading. This sensor requires a path to an application exe file* which is then used to monitor the state of this application, for example D:\Gry\Powder\powder-sse.exe C:\Windows\System32\notepad.exe Note: HASS.Agent will convert those to "powder-sse" and "notepad" respectively (and those "short" versions can be put there manually)

Plus while testing this I noticed that it has a bug where trying to monitor "HASS.Agent", it'll try to find windows of "HASS" due to how it tries to shorten the name...