Skip to content

feat: Add support for Sagewe F3s202-USVC smart plug#533

Open
jasonjhofmann wants to merge 1 commit into
webdjoe:devfrom
jasonjhofmann:add-sagewe-f3s202-usvc
Open

feat: Add support for Sagewe F3s202-USVC smart plug#533
jasonjhofmann wants to merge 1 commit into
webdjoe:devfrom
jasonjhofmann:add-sagewe-f3s202-usvc

Conversation

@jasonjhofmann

Copy link
Copy Markdown

What

Adds the Sagewe 15A Wi-Fi Smart Outlet Plug with Energy Monitoring (sold under the Sagewe brand, pairs via the VeSync app) to the device map:

  • deviceType: F3s202-USVC
  • configModule: SG_WFBO_OTL_F3s202-USVC_US
  • cid prefix: vsot

It is registered under the existing WHOGPLUG OutletMap entry — no new class needed.

Why the WHOGPLUG class is correct (verified against the live API)

Probed a physical plug with both whitelabel bypassV2 dialects:

  • BSDOG dialectgetProperty returns inner result code -1 (unsupported).
  • WHOG dialect — full support:
    • getOutletStatus{"enabled": false, "voltage": 124.02, "energy": 0, "power": 0, "current": 0}
    • setSwitch {"id": 0, "enabled": true} → code 0, state reads back enabled: true with live load telemetry (power: 86.8, current": 0.70); off round-trip clean
    • getEnergyHistory (weekly + monthly) → populated energyInfos day buckets
    • getELECConsumePerMonthLastYear (yearly) → 12 populated month buckets

So the plug supports everything the WHOGPLUG entry claims, including ENERGY_HISTORY.

Tested with 21 physical units on one account; also running in Home Assistant (2026.7.2 stock vesync integration with this dev type patched into the device map) — switch + voltage/power/energy entities all work.

Changes

  • src/pyvesync/device_map.py — append F3s202-USVC to the WHOGPLUG entry's dev_types
  • README.md, docs/supported_devices.md — list the device

No test changes: fixtures (src/tests/api/vesyncoutlet/WHOGPLUG.yaml) and parametrization key on setup_entry, and call_json uses dev_types[0], so the appended type reuses existing WHOGPLUG coverage.

Testing

  • pytest src/tests/380 passed, 3 skipped on this branch
  • Live-API verification as above (read + write + energy history)

🤖 Generated with Claude Code

https://claude.ai/code/session_01RzgVNa9W9icsjQZcmRu9J9

Register the Sagewe 15A Wi-Fi Smart Outlet Plug with Energy Monitoring
(deviceType F3s202-USVC, configModule SG_WFBO_OTL_F3s202-USVC_US) under
the existing WHOGPLUG OutletMap entry.

Verified against the live API with physical devices: the plug speaks the
full WHOGPLUG bypassV2 dialect — getOutletStatus returns
enabled/voltage/power/current/energy, setSwitch toggles with clean state
readback, and energy history works for weekly/monthly (getEnergyHistory)
and yearly (getELECConsumePerMonthLastYear). The BSDOG getProperty
dialect returns inner result code -1 for this device, confirming
VeSyncOutletWHOGPlug is the correct class.

No test changes needed: fixtures and parametrization key on setup_entry,
and call_json uses dev_types[0], so the appended dev type reuses the
existing WHOGPLUG coverage.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RzgVNa9W9icsjQZcmRu9J9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant