diff --git a/pyproject.toml b/pyproject.toml index 82cf57b..e3fd8df 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "pyvesync" -version = "3.4.2" +version = "3.4.3" description = "pyvesync is a library to manage Etekcity Devices, Cosori Air Fryers, and Levoit Air Purifiers run on the VeSync app." readme = "README.md" requires-python = ">=3.11" diff --git a/src/pyvesync/devices/vesyncbulb.py b/src/pyvesync/devices/vesyncbulb.py index 8d99dc4..86528ee 100644 --- a/src/pyvesync/devices/vesyncbulb.py +++ b/src/pyvesync/devices/vesyncbulb.py @@ -299,16 +299,8 @@ async def get_details(self) -> None: self.state.connection_status = ConnectionStatus.OFFLINE return self.state.brightness = model.brightness - self.state.device_status = model.deviceStatus - self.state.connection_status = model.connectionStatus - - @deprecated( - 'toggle() is deprecated, use toggle_switch(toggle: bool | None = None) instead' - ) - async def toggle(self, status: str) -> bool: - """Toggle switch of ESL100 bulb.""" - status_bool = status != DeviceStatus.ON - return await self.toggle_switch(status_bool) + self.state.device_status = DeviceStatus(model.deviceStatus) + self.state.connection_status = ConnectionStatus(model.connectionStatus) async def toggle_switch(self, toggle: bool | None = None) -> bool: if toggle is None: @@ -331,18 +323,6 @@ async def toggle_switch(self, toggle: bool | None = None) -> bool: self.state.device_status = status return True - @deprecated('Use set_brightness() instead') - async def set_status(self, brightness: int) -> bool: - """Set brightness of dimmable bulb. - - Args: - brightness (int): Brightness of bulb (0-100). - - Returns: - bool: True if successful, False otherwise. - """ - return await self.set_brightness(brightness=brightness) - async def set_brightness(self, brightness: int) -> bool: if not self.supports_brightness: logger.warning('%s is not dimmable', self.device_name)