Yes I saw that, perfect thank you !
I’ve updated my Plex script to show playing notifications on desktop:
It’s awesome thank you
Yes I saw that, perfect thank you !
I’ve updated my Plex script to show playing notifications on desktop:
It’s awesome thank you
Great! Thanks for sharing, looks handy (nice choice of movie ).
Wishlist
Commands: command to open URL on default browser
I was looking at your wishlist. The current version to open url in a browser isn’t available yet?
When you get to this wishlist, please have the option to open in incognito as well. Thanks.
How can I use the lastactive sensor to trigger an action if lastactive value decreases to a value below 10 seconds?
The sensor belongs to a stationary PC so can be used as presence detection.
Using a Numeric State trigger with “below 10” does not work.
Hi @duceduc, it’s not public yet no, but I have a test working, so shouldn’t be long before it gets released. The incognito part is a good idea, will add
Hi @amplitur, currently all sensor data gets transmitted as ‘string’ values (it’s on the to-do list) so I’m guessing it has something to do with that. You’d have to cast it to an integer value first, something like this:
Entity states (as opposed to attributes) are always strings, so that’s most likely not the problem.
This is a little bit more complicated that I had hoped
The state of sensor is a datetime string:
In order to get the delta to the current time I have to convert LastActive and now() to Unix timestamp and subtract LastActive from now:
{{ now() | as_timestamp - states.sensor.ll2020_lastactive.state | as_timestamp }}
This will return the number of seconds since LastActive:
Still have to figure out how to best use this as a trigger when I only want the automation to be triggered when the value falls below e.g. 60 seconds, not every time the it is below 60 seconds.
Use the template trigger.
Template triggers work by evaluating a template when any of the recognized entities change state. The trigger will fire if the state change caused the template to render ‘true’ (a non-zero number or any of the strings
true
,yes
,on
,enable
) when it was previously ‘false’ (anything else).
alias: example
trigger:
- platform: template
value_template: "{{ (now() - states('sensor.ll2020_lastactive')|as_datetime).total_seconds() < 60 }}"
action:
... etc ...
Alternate version of the template:
value_template: "{{ now() - states('sensor.ll2020_lastactive')|as_datetime < timedelta(minutes=1) }}"
Is there a list of the built-in commands somewhere? I checked the readme and wiki but it just see broad mention of it “Aside from the builtin commands, you can use your own custom command”. I am considering migrating from IoTLink and want to know how what I can replicate out of the box and what will require writing custom commands.
Edit: I see a list here in the source code. Are those all the built-in ones?
Hey @berkron, yep that’s the list. The upcoming version will also have a set-volume command and launch-url command.
Let me know if there are others you’d miss!
Expanding the wiki with more detailed info is my todo list, but HASS.Agent itself is already a lot of work so might take some time.
At first glance the main thing missing is sleep. Most of our gaming PCs sit on standby and can sometimes either get woken up accidentally or left on after use so sleeping them remotely is very handy in a multi level house.
I was planning to implement some process monitoring sensors so record how long certain apps / processes are running but haven’t done that yet and debating if I’m going to so that’s not necessarily a deal breaker for migration.
Thank you so much for the huge amount of work you’ve undoubtedly put in. It’s so great to see something like this so active. IoT Link has been pretty great but seems abandoned so a replacement like this is huge.
Actually I am also reading which user is currently logged into the machine to record how long the kids are logged on for and remind them to get off (via RGB light bulbs and notifications) if they’re screen time is up. Kind of a DIY screen time control system for the gaming PCs. Does HASS.Agent have sensors for current username?
Sleep is a good idea, already has hibernation but will add that as well.
Coincidental stuff; I’ve added process/service monitoring and logged-users to the latest beta build I’ll be releasing the beta soon, so you could test it, otherwise you can wait for the regular release.
Fantastic. I’m in no rush (short on time) so can easily wait and test out later. Thanks!!!
Hi @bverkon, I’ve published the beta. If you have some spare time, it’d be great if you could test! Let me know if it doesn’t fit your requirements.
I am looking at the list of available sensors, but do not see one that can tell me if my pc is on or offline? Does anyone know how to create this sensor??
You can use the ping or nmap sensors to show what is online. I also have one automation testing if the sensors are unavailable
ok. I will add a ping sensor.
Maybe an online status sensor can be added to the wishlist ??