I want to collect the battery level of my laptop at regular intervals (5 mins) and when it is 100% i want to ,make an automation to switch off my Sonoff S20 which is charging it - and vice versa when it is 10%.
How can i create a sensor to do this? My Hass.io is on a Rasp Pi3
you can write a powershell script to do this that run on the laptop.
I might do the same, can share when finnished if you don’t write/find anything until then.
I will updates you as fast as it is done Just have to understand this new Home-Assistant API authentication first.
My plan are to make a powershell script to send all kinds of info from the PC to Home-Assistant, like cpu load, ram usage, drivespace and so on.
It’s worth another look. I managed to get it working by stopping the windows service after I updated the config file and then starting the service again.
Refreshed mosquito broker too and all the entities showed up.
The battery status did initally not report correctly. I just refreshed home assistant and then all the info came up.