Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/pyvesync/device_map.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,15 @@ class ThermostatMap(DeviceMapTemplate):
setup_entry='BSDOG01',
device_alias='Smart Plug Series',
),
OutletMap(
dev_types=['WYLDR16A1081'],
class_name='VeSyncWYLDRPlug',
features=[OutletFeatures.ONOFF, OutletFeatures.ENERGY_MONITOR],
model_name='Smart Plug',
model_display='WYLDR Smart Plug',
setup_entry='WYLDR16A1081',
device_alias='WYLDR Smart Plug',
),
]
"""List of ['OutletMap'][pyvesync.device_map.OutletMap] configuration
objects for outlet devices."""
Expand Down
25 changes: 25 additions & 0 deletions src/pyvesync/devices/vesyncoutlet.py
Original file line number Diff line number Diff line change
Expand Up @@ -989,6 +989,31 @@ async def toggle_switch(self, toggle: bool | None = None) -> bool:
return True


class VeSyncWYLDRPlug(VeSyncBSDOGPlug):
"""VeSync WYLDR16A1081 smart plug.

Identical to VeSyncBSDOGPlug but does not support energy history
(weekly/monthly) via the bypassV2 API. Calls to getEnergyHistory
return result code -1 for this device type.

Args:
details (ResponseDeviceDetailsModel): The device details.
manager (VeSync): The VeSync manager.
feature_map (OutletMap): The feature map for the device.

"""

__slots__ = ()

async def _get_energy_history(self, _history_interval: str) -> None:
"""Energy history is not supported by this device type."""
logger.debug(
'%s (%s) does not support energy history retrieval',
self.device_name,
self.device_type,
)


class VeSyncESW10USA(BypassV2Mixin, VeSyncOutlet):
"""VeSync ESW10 USA outlet.

Expand Down
Loading