There is a `charger_connected` property in pimu status: https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/pimu.py#L184 to help with this.