Not all options covered
Premises + you have license, plugged in - ok regardless of batter or mains.
Premises have license, you don't , plugged in - ok?
Premises have license, you don't , not plugged in - breaking the law?
Premises no license, you do, not plugged in - ok.
Premises no license, you do, plugged in - breaking the law
Neither premise nor you have license - breaking the law regardless of battery or mains.
Does that make any logical sense? How does where a device get its power from (battery or mains) make a difference? The law is an ass.
And detector vans are in your area!