I have a bit of an issue whereby I have a single smart switch that I use for charging either my phone or my son’s tablet.
The automation is set up so that whenever either device hits 100% charge and senses that it is being charged, the switch automatically switches off.
However, the problem with this is that if I charge my phone this way but my son decides to use a separate charger, this can cause the smart switch to turn off if the tablet charges to 100% more quickly.
Can anyone think of a clever way round this?
Ultimately, I need a way for the device to know that it is connected to the smart switch (as opposed to any other power source) but I am not sure that there is any way of sensing that.
I wonder if you have a switch with power monitoring, what’s the response speed like and if it could pick up power draw as low as 5W.
If so, you could try this:
Setup a threshold on the power monitoring entity.
Install Home Assistants companion and monitor charging status.
if device logs as charging, detect if one of the switches triggered the threshold in the last 20 mins (min update freq is 15mins on the app if I recall correctly).
Mark a helper to tie a relationship between the phone and the switch.
If device reports battery at 100%, check if helper is populated with a value, if so, turn off the related switch and reset the helper.
But you’ll have to decide how long you want the automation to reset, eg after 4 hours, assume the device will be removed from the charging station and reset the switch to on state. I don’t have a great idea on how you can easily setup a reset, unless you have a convenient button lying around.
Maybe you can send a persistent notification to the device when it’s at 100% that allows you to reset the switch to on and ready to charge state. That’ll be quite a decent UI.
Either you have a really old phone and tablet from around 2010 or you are just making obsolete automations.
Modern phones and tablet will stop charging at 100% and not start again until so e lower set value, like 93% or so. This is to extend battery life.
The really modern phones and tablets even deploy AI to analyse your usage and plan the charging, so it will only charging once, but time it so it will hit 100% just before you take your phone out of the charger.