Running a powershell script via HASS.Agent causes it to run script more than once.
I have a script which outputs text to a text file with including the time that the log happened. When running this via PowerShell by itself, it works perfectly fine. When running via Hass.Agent it repeatedly runs. This is a HASS.Agent sensor which retrieves data for Home Assistant whilst also writing to a log file of the result.
Solution:Jump to solution
GitHub
Fix: sensor being updated constantly when value doesn't change by a...
This PR fixes issue where the "LastUpdated" value is not updated if sensor value is same as previously.
Thanks to Shupershuff for reporting the issue :)
Due to this issue sensor's &qu...
13 Replies
Interesting
@Amadeo ? Is there something weird because of the PowerShell script?
Hard to say without having the script to review
And then hopefully replicate the issue
here's a very basic script you can use to replicate the issue
I add it as a sensor on a 30 second timer in hass.agent:
Hass.agent then runs the script every 5 seconds
definitely a bug within hass.agent. seems to use the 'Update every x seconds' value for the first time and then just reruns on repeat
thx, I'll try to reproduce that in a sec
yeah
so, the issue is that lastupdate timestamp is "updated" only if value changes and message is actually sent
since the returned value doesn't change, timestamp is not updated and yeah
that's like a one line fix
although I wonder how many ppl used it as a bug-feature
@Shupershuff gib github handle please
if you have one
Solution
GitHub
Fix: sensor being updated constantly when value doesn't change by a...
This PR fixes issue where the "LastUpdated" value is not updated if sensor value is same as previously.
Thanks to Shupershuff for reporting the issue :)
Due to this issue sensor's &qu...
I love that "testing banana" made it's way into the pull request hahaha
it's also Shupershuff