A method for controlling electronic devices using a virtual assistant on a user device, the user device performing each step of the method, the method comprising: receiving an audio input comprising user speech corresponding to a user intent to issue a command to one or more electronic devices; transmitting data corresponding to the audio input to one or more servers; receiving, from the one or more servers: an identification of a first electronic device determined by the one or more servers based on the data corresponding to the audio input; and a first command to be performed by the first electronic device determined by the one or more servers based on the data corresponding to the audio input; transmitting the first command to the first electronic device; characterized by: receiving, after transmitting the first command to the first electronic device, a second audio input comprising user speech corresponding to a user intent to store states of a plurality of electronic devices as a configuration, wherein the plurality of electronic devices includes the first electronic device; transmitting data corresponding to the second audio input to the one or more servers; receiving, from the one or more servers, an instruction to query a state of each of the plurality of electronic devices determined by the one or more servers based on the data corresponding to the second audio input; transmitting a state query to each of the plurality of electronic devices determined by the one or more servers; receiving, from each of the plurality of electronic devices, a current state of the respective electronic device; and transmitting the current state of each of the plurality of electronic devices to the one or more servers to be stored as a configuration, wherein the configuration defines a respective state of each of the plurality of electronic devices to use in response to a user command that references the configuration. receiving an audio input comprising user speech corresponding to a user intent to issue a command to one or more electronic devices; transmitting data corresponding to the audio input to one or more servers; receiving, from the one or more servers: an identification of a first electronic device determined by the one or more servers based on the data corresponding to the audio input; and a first command to be performed by the first electronic device determined by the one or more servers based on the data corresponding to the audio input; an identification of a first electronic device determined by the one or more servers based on the data corresponding to the audio input; and a first command to be performed by the first electronic device determined by the one or more servers based on the data corresponding to the audio input; transmitting the first command to the first electronic device; characterized by: receiving, after transmitting the first command to the first electronic device, a second audio input comprising user speech corresponding to a user intent to store states of a plurality of electronic devices as a configuration, wherein the plurality of electronic devices includes the first electronic device; transmitting data corresponding to the second audio input to the one or more servers; receiving, from the one or more servers, an instruction to query a state of each of the plurality of electronic devices determined by the one or more servers based on the data corresponding to the second audio input; transmitting a state query to each of the plurality of electronic devices determined by the one or more servers; receiving, from each of the plurality of electronic devices, a current state of the respective electronic device; and transmitting the current state of each of the plurality of electronic devices to the one or more servers to be stored as a configuration, wherein the configuration defines a respective state of each of the plurality of electronic devices to use in response to a user command that references the configuration. receiving, after transmitting the first command to the first electronic device, a second audio input comprising user speech corresponding to a user intent to store states of a plurality of electronic devices as a configuration, wherein the plurality of electronic devices includes the first electronic device; transmitting data corresponding to the second audio input to the one or more servers; receiving, from the one or more servers, an instruction to query a state of each of the plurality of electronic devices determined by the one or more servers based on the data corresponding to the second audio input; transmitting a state query to each of the plurality of electronic devices determined by the one or more servers; receiving, from each of the plurality of electronic devices, a current state of the respective electronic device; and transmitting the current state of each of the plurality of electronic devices to the one or more servers to be stored as a configuration, wherein the configuration defines a respective state of each of the plurality of electronic devices to use in response to a user command that references the configuration.