Skip to content

Add an ambient light implementation

Following !20 (closed) @zewelor @stavros

It is another implementation for the ambient light of the JIAOYUE 650.

Highlights:

  • Enum ControlType for MAIN and AMBIENT.
  • Added the bg_x properties for get_properties and the action_property_map
  • Dict ControlPrefix with an empty prefix for MAIN and bg_ prefix for the AMBIENT light.
  • The @_command decorator has been modified to take: method, params, kwargs.
  • The @_command decorator now prefix the method depending on the type value such as bulb.turn_on(type=ControlType.AMBIENT). If omitted, default to ControlType.MAIN.

TODOS:

  • Unit tests

TEST RESULTS:

  • turn_on: OK
  • turn_off: OK
  • set_color_temp: OK
  • set_rgb: OK
  • set_adjust: OK
  • set_hsv: OK
  • set_brightness: OK
  • toggle: OK
  • dev_toggle: OK
  • set_default: OK
  • start_flow: OK
  • stop_flow: OK
Edited by Alexis Paques

Merge request reports