Hello,
I have a 2 file sensors each linked to a file containing the Tx and Rx of the Ethernet card of a Linux Server.(updated every minute) and a template sensor to total the two to use as a trigger level in (lower than) in an automation
What is your testing method? In order for a Numeric state trigger to fire the value must change from above threshold to below the threshold. It will not fire if the threshold is already passed when the automation is reloaded.
Just in case it interests some-one: The following works:
I created a timer helper and an automation which is triggered by the start of the PC or the passing (low to high) of the Ethernet activity limit. In the action of the automation, a loop will reset the timer every minute while the Ethernet activity remains above the limit.
At first glance, I would not think so. (Although it took me a while to get the script which retrieves absolute Rx and Tx values from /proc/net/dev and convert that in rates/sec to put on HA)
I now have all info together (of course I only really need the on/off switch )