sleevezipper / hass-workstation-service

Provide useful sensors and services from your workstation to Home Assistant.
Apache License 2.0
613 stars 54 forks source link

WMI sensor input for Screen detection #162

Open Makr91 opened 2 years ago

Makr91 commented 2 years ago

So I am able to turn on and off screens, but when trying to make a template switch in home assistant tied to a WMI sensor, I can't seem to find a way to get WQL to select the nth result to return the required single value.

My current WQL query:

SELECT Active FROM WmiMonitorBasicDisplayParams

I have three monitors, so it would return 3 instances, I could just select the nth result I could satisfy the need for a single object to be returned.

Btw, I am using this tool to turn my monitors on:

http://www.nirsoft.net/utils/multi_monitor_tool.html