Today I wanted to write a task where I could check if the phone is charging or not and then do something based on that state e.g.:
IF screen=off AND charging_state = non, THEN wiki-off
When I take my tablet with me during travel, for some reason it starts to drain the battery when the screen is off and the wifi is on.
I'm proposing a new variable: charging_state. It would have these values ac, usb, none, wireless
These values can be taken from the built-in Power state.
Creating multiple profiles to make up our own variable is