shelly virtual set

shelly virtual set

Set a virtual component value

Synopsis

Set the value of a virtual component.

The key format is “type:id”, for example “boolean:200” or “number:201”.

For boolean components, use –toggle to flip the current value. For button components, use “trigger” as the value to press the button.

1
shelly virtual set <device> <key> <value> [flags]

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
  # Set a boolean to true
  shelly virtual set kitchen boolean:200 true

  # Toggle a boolean
  shelly virtual set kitchen boolean:200 --toggle

  # Set a number
  shelly virtual set kitchen number:201 25.5

  # Set text
  shelly virtual set kitchen text:202 "Hello World"

  # Set enum value
  shelly virtual set kitchen enum:203 "option1"

  # Trigger a button
  shelly virtual set kitchen button:204 trigger

Options

1
2
  -h, --help     help for set
  -t, --toggle   Toggle boolean value instead of setting

Options inherited from parent commands

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
      --config string           Config file (default $HOME/.config/shelly/config.yaml)
      --log-categories string   Filter logs by category (comma-separated: network,api,device,config,auth,plugin)
      --log-json                Output logs in JSON format
      --no-color                Disable colored output
      --no-headers              Hide table headers in output
      --offline                 Only read from cache, error on cache miss
  -o, --output string           Output format (table, json, yaml, template) (default "table")
      --plain                   Disable borders and colors (machine-readable output)
  -q, --quiet                   Suppress non-essential output
      --refresh                 Bypass cache and fetch fresh data from device
      --template string         Go template string for output (use with -o template)
  -v, --verbose count           Increase verbosity (-v=info, -vv=debug, -vvv=trace)

SEE ALSO