From b77f4df49411389e0be2ccb75762bf7b19f4285f Mon Sep 17 00:00:00 2001 From: jasonjhofmann <16144532+jasonjhofmann@users.noreply.github.com> Date: Sat, 18 Jul 2026 18:57:40 -0700 Subject: [PATCH] feat: Add support for Sagewe F3s202-USVC smart plug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Claude-Session: https://claude.ai/code/session_01RzgVNa9W9icsjQZcmRu9J9 --- README.md | 1 + docs/supported_devices.md | 2 ++ src/pyvesync/device_map.py | 1 + 3 files changed, 4 insertions(+) diff --git a/README.md b/README.md index 5ceff41b..e9a6dc2b 100644 --- a/README.md +++ b/README.md @@ -218,6 +218,7 @@ pip install pyvesync 7. BSDOG / Greensun Smart Outlet Series (BSDOG01, BSDOG02, WYSMTOD16A, WM-PLUG and more) 8. WHOPLUG / Greensun Smart Outlet 9. WYLDR Smart Plug (WYLDR16A1081) (Supports energy monitoring but not energy history) +10. Sagewe 15A Smart Plug with Energy Monitoring (F3s202-USVC) diff --git a/docs/supported_devices.md b/docs/supported_devices.md index c80bd7e2..4026b9d0 100644 --- a/docs/supported_devices.md +++ b/docs/supported_devices.md @@ -15,6 +15,7 @@ The VeSync API supports a variety of devices. The following is a list of devices - [Etekcity 15A Outdoor Dual Outlet][pyvesync.devices.vesyncoutlet.VeSyncOutdoorPlug] - [BSDOG / Greensun Smart Outlet Series][pyvesync.devices.vesyncoutlet.VeSyncBSDOGPlug] - WHOPLUG / GREENSUN - [WYLDR Smart Plug][pyvesync.devices.vesyncoutlet.VeSyncBSDOGPlug] - WYLDR16A1081 (energy monitoring without energy history) + - [Sagewe 15A Smart Plug][pyvesync.devices.vesyncoutlet.VeSyncOutletWHOGPlug] - F3s202-USVC 3. Switches - [ESWL01][pyvesync.devices.vesyncswitch.VeSyncWallSwitch] - Etekcity Wall Switch - [ESWL03][pyvesync.devices.vesyncswitch.VeSyncWallSwitch] - Etekcity 3-Way Switch @@ -69,6 +70,7 @@ Switches have minimal features, the dimmer switch is the only switch that has ad | 15A Outdoor Dual Outlet | ✔ | ✔ | | | Smart Plug Series (WHOGPLUG / BSDOG01) | ✔ | ✔ | | | WYLDR Smart Plug (WYLDR16A1081) | ✔ | | | +| Sagewe Smart Plug (F3s202-USVC) | ✔ | ✔ | | Power stats are realtime power, voltage and energy readings from the device. Energy history is the weekly, monthly and yearly energy usage retrieved with diff --git a/src/pyvesync/device_map.py b/src/pyvesync/device_map.py index 172b04c3..542ab275 100644 --- a/src/pyvesync/device_map.py +++ b/src/pyvesync/device_map.py @@ -461,6 +461,7 @@ class ThermostatMap(DeviceMapTemplate): OutletMap( dev_types=[ 'WHOGPLUG', + 'F3s202-USVC', ], class_name='VeSyncOutletWHOGPlug', features=[