1. A method of securing the learning mode of a device comprising an assembly of at least one command transmitter, communicating with a command receiver capable of driving an element providing for the security and/or the comfort of a building and capable of being switched to learning mode by one or more activation functions, wherein one or more actions of which at least one is applied to a particular command transmitter of the assembly, termed secure, causes the disabling of at least one function of activation of the learning mode of the command receiver.