GithubHelp home page GithubHelp logo

Comments (8)

joshuar avatar joshuar commented on July 23, 2024 3

Hey @fhp, script sensors can now be created with release 5.2.0. See the docs for how to configure them.

This may also meet your feature request @geekpete?

I am still thinking about how I can get the application name/title as a native sensor and there does seem to be some development in the major desktops towards exposing this in an easier way.

from go-hass-agent.

joshuar avatar joshuar commented on July 23, 2024 1

Hey @fhp I like that idea! I'll mull over how to implement it. Look out for this feature in an upcoming release ;)

from go-hass-agent.

joshuar avatar joshuar commented on July 23, 2024

Hey @geekpete thanks for trying out go-hass-agent. Yeah, I've been mulling how I can get a better application name which might help ease making automations in Home Assistant when certain apps have focus or are running.

In my primary use-case, with playing games on Steam, I just have to match on steam_app_* in the Active App sensor. I made a template binary sensor "Playing Games" which is true when the Active App matches the former. But I could imagine it would be nicer and more useful to have a human-friendly application name.

Does the "Active App" sensor work for you at the moment and what does it report when you have a Zoom window focused (likely need to look at the sensor state history in Home Assistant)?

from go-hass-agent.

fhp avatar fhp commented on July 23, 2024

Another way to solve this would be to allow custom scripts to be added to this tool.
These scripts then report their output as a certain sensor, using some refresh interval.

This is how https://github.com/LAB02-Research/HASS.Agent works, and this seems very powerful. Especially with the Linux command-line ecosystem.

from go-hass-agent.

fhp avatar fhp commented on July 23, 2024

Awesome, thanks for your work. I surely will take a look!

from go-hass-agent.

joshuar avatar joshuar commented on July 23, 2024

I'm going to close this issue out on the assumption that the script sensor feature can fulfil the original request. If it is missing functionality, or there is a bug in using the script sensor functionality, please open an issue to report. Thanks for trying out go-hass-agent!

from go-hass-agent.

fhp avatar fhp commented on July 23, 2024

Finally got around to setting this up on my laptop, and the scripts work great!

Added the webcam script from #71 and a variant of that script to detect if my laptop is docked (by checking if lsusb | grep Dock returns anything).

So now I know if I'm in a call, and if my laptop is in my office, and using the screen_locked property, if I am near my laptop 😀 That's a good start for a lot of automations.

from go-hass-agent.

joshuar avatar joshuar commented on July 23, 2024

Awesome! I'm so glad the agent is useful for you @fhp!

from go-hass-agent.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.