Skip to content

Tapo v0.8.12

Choose a tag to compare

@mihai-dinculescu mihai-dinculescu released this 11 Mar 14:16
· 143 commits to main since this release
c9bb047

Rust

Added

  • DeviceType: added enum that categorizes Tapo devices by their handlers (e.g. Light, Plug, Hub), with a from_model constructor for mapping model strings.
  • DiscoveryResult: added accessor methods device_type(), model(), ip(), device_id(), and nickname() for convenient access to common properties without pattern matching.
  • All handlers: added debug feature flag that gates inspection methods get_device_info_json(), get_child_device_list_json(), get_child_device_component_list(), get_supported_ringtone_list(), and get_component_list().
  • All handlers: added get_component_list() method (behind debug feature) for inspecting device capabilities.

Changed

  • DeviceDiscovery: changed the discover method stream to raise tapo::TapoDiscoveryError instead of tapo::TapoError for more specific error handling, such as including the IP of the device that caused the error.
  • HubHandler, PowerStripHandler, PowerStripEnergyMonitoringHandler: replaced get_child_device_component_list_json() with get_child_device_component_list() (behind debug feature) returning Vec<ChildDeviceComponentList> instead of raw JSON.

Python

Added

  • DeviceType: added enum that categorizes Tapo devices by their handlers (e.g. Light, Plug, Hub).
  • DiscoveryResult: added accessor properties device_type, model, ip, device_id, and nickname for convenient access to common properties without pattern matching.
  • Component: added class (behind debug feature) for inspecting device capabilities returned by get_component_list().
  • All handlers: added get_component_list() method (behind debug feature) for inspecting device capabilities.
  • All response and request classes: added to_dict() method for converting to a Python dictionary.

Changed

  • DeviceDiscovery: changed the discover method stream to raise tapo.TapoDiscoveryError instead of tapo.TapoError for more specific error handling, such as including the IP of the device that caused the error.
  • HubHandler, PowerStripHandler, PowerStripEnergyMonitoringHandler: replaced get_child_device_component_list_json() with get_child_device_component_list() returning list[ChildDeviceComponentList] instead of raw JSON.
  • ApiClient: changed the discover_devices method's timeout_s parameter to default to 10 seconds, making it optional.

Fixed

  • ApiClient: corrected the timeout_s parameter type to Optional[int].
  • ApiClient: corrected p316() return type from PowerStripHandler to PowerStripEnergyMonitoringHandler.
  • HubHandler: corrected missing self parameter on get_supported_ringtone_list().
  • S200Handler: added missing module registration that prevented from tapo import S200Handler from working.
  • ColorLightSetDeviceInfoParams: added RgbicLightStripHandler to the send() method's accepted handler types.
  • PlugEnergyMonitoringHandler, PowerStripPlugEnergyMonitoringHandler: corrected start_date and end_date parameter types in get_energy_data() from datetime to date.
  • LightHandler, ColorLightHandler, RgbLightStripHandler, RgbicLightStripHandler: corrected get_device_usage() return type from DeviceUsageResult to DeviceUsageEnergyMonitoringResult.

Full Changelog: v0.8.11...v0.8.12