# List all switches on a device
shelly switch list kitchen
# List switches with JSON output
shelly switch list kitchen -o json
# Get switches that are currently ON
shelly switch list kitchen -o json | jq '.[] | select(.output == true)'
# Calculate total power consumption
shelly switch list kitchen -o json | jq '[.[].power] | add'
# Get switch IDs only
shelly switch list kitchen -o json | jq -r '.[].id'
# Check all switches across multiple devices
for dev in kitchen bedroom living-room; do
echo "=== $dev ==="
shelly switch list "$dev" --no-color
done
# Short forms
shelly switch ls kitchen
shelly sw ls kitchen