The present disclosure relates to an electrical system including a primary device and secondary device, wherein the primary device includes: a source of electrical power; a cavity configured to receive the secondary device; at least one electrical contact within the cavity configured to contact a corresponding contact on the secondary device when the secondary device is in the cavity, the at least one electrical contact being electrically connected to the source of electrical power; and a lid moveable between a first position to retain the secondary device in contact with the at least one electrical contact, and a second position in which the secondary device is free to move out of contact with the at least one electrical contact. The electrical system may relate to an aerosol-generating system having an aerosol-forming substrate.