Hi,
I have trouble to solve this problem.
I would like to control a wall plug on/off of a calculated on time for my laptop, i.e when the laptop has been on for 3 hours switch on the wall plug and charge the laptop for 1 hour then turn off the wall plug and stop charging the laptop. Restart the time calculation for the laptop on time and so…
In that way I don’t need to bother about the laptop charger be on all the time.
I have to laptop in the same place all the time.
Is this automation best to do in Home Assistant or Node red ?
It’s pretty simple to do with a few automations and a timer.
trigger - laptop on. action - start a 3 hour timer.
trigger - timer expired. action - turn on wall plug.
trigger - wall plug on for 1 hour. action - turn off wall plug and start timer.
trigger - laptop off. action - stop timer.
Having said that most modern laptops have energy management that cycles the laptop battery between 90% and 20% SOC if left plugged in. So this may not be needed.
Hi tom_I,
When I look on the Timer example it seems to restart each time the input goes high. I would rather like to calculate the total on time for the laptop. I.e the laptop can be turn on and off several times before it has to be charged.
And when the laptop has been on for total 3h the wall plug should be turned on and the timer should be reseted.
Do you know to make such timer function?