> For the complete documentation index, see [llms.txt](https://mediocraty-itself.gitbook.io/rusttools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mediocraty-itself.gitbook.io/rusttools/in-game-commands/grouping-smart-switches-commands.md).

# Grouping smart switches commands

Making groups of smart switches allows you easily acess multiple amount of switches at same time to switch their value or to force them to one state.

## - Creating smart switch group

* `.group add <group_name> <smart_switch_names>` (alias "`.gr`")- Creates a group of smart switches by their names. In second field switch names must be separated by space like in example.\\

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2FXBAAnfHj2e9eusb87cni%2Fimage.png?alt=media&amp;token=b2b7b4bc-ecda-40dc-8f81-dea18fe5e069" alt=""><figcaption></figcaption></figure>

## - Deleting smart switch group

* `.group remove <group_name>`(alias "`.gr`") - deletes group from data of saved groups.

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2FsvGYhroieJ3TFDEVsQzw%2Fimage.png?alt=media&amp;token=5ecc361b-303a-4865-8167-e418bdd66afd" alt=""><figcaption></figcaption></figure>

## - Renaming smart switch group

* `.group rename <old_group_name> <new_group_name>`(alias "`.gr`") - renames group in data.

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2FQgWBMQwxOma9fsf1Z3av%2Fimage.png?alt=media&amp;token=69b610b7-8217-47c9-a935-9b900a92b780" alt=""><figcaption></figcaption></figure>

## - Listing existing groups

* `.group`(alias "`.gr`")  -  lists all groups that are saved in data

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2Fkn7NOHAQGkY6rZaEPVKG%2Fimage.png?alt=media&amp;token=2e354def-8207-4b0f-849f-12fcc8a98033" alt=""><figcaption></figcaption></figure>

## - Listing switches that are in specific group and info of the group

* `.group info <group_name>`(alias "`.gr`")  - returns data saved for specific group by name and switches status

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2F80agmx1gnXxxt4ypUIFy%2Fimage.png?alt=media&amp;token=fdefa835-42b8-4450-b4a1-d926c40cb133" alt=""><figcaption></figcaption></figure>

<sup><mark style="color:yellow;">NOTE :<mark style="color:yellow;"></sup>   ![](https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2FoaWbjW4oU8Lq817pNQgo%2Fimage.png?alt=media\&token=bd8bb078-0b16-4d84-81bc-67a0efd7a7a7) <sup><mark style="color:yellow;">- means bot cannot acess smart switch for some reason.<mark style="color:yellow;"></sup>

<sup><mark style="color:yellow;">Bot loses switch acess if one of this events happens:<mark style="color:yellow;"></sup>

<sup><mark style="color:yellow;">- Wrong data (Invalid ID or wrong server connected)<mark style="color:yellow;"></sup>\ <sup><mark style="color:yellow;">- Account which is bot connected through is not authed on TC which covers the smart switch<mark style="color:yellow;"></sup>\ <sup><mark style="color:yellow;">- Switch is destroyed<mark style="color:yellow;"></sup>&#x20;

## - Switching value of all the switches in group

* `.group <group_name> (on/off)` (alias "`.gr`") - changes value of each switch 1 by 1 with delay of 0.1 seconds.\
  Argument "<mark style="color:yellow;">`on/off`</mark>"  is optional.Inputing on or off will force all switches to same state.

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2Fe3Ji6PFh9vlQBWIX0mNQ%2Fimage.png?alt=media&amp;token=d14ae5d2-f4cd-4e38-b169-ce17fdcae25c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2714295573-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FH2xPiUNoVsVJGOZJTB7R%2Fuploads%2FMs1CLyyDNoh70ONya54z%2Fimage.png?alt=media&amp;token=892e3860-9799-4d22-810a-11e9eedaaf0e" alt=""><figcaption></figcaption></figure>
