A method is disclosed for state sensing and controlling of a multi-state drug delivery device. In some embodiments a power switch is reused as a state sensor. Optionally the state sensor may be toggled by user actions and/or the movements of parts of the device, for example needle and/or a protective element. Optionally, drug discharge and/or status indication is controlled in accordance with sensor output. In some embodiments control is by means of a processor. Alternatively or additionally, control is by means of simple physical circuits.