Skip to content

Commit

Permalink
fixed issue 21, where setting color would give "TypeError: 'PropDef' …
Browse files Browse the repository at this point in the history
…object is not callable"
  • Loading branch information
JohnMTorgerson committed May 16, 2021
1 parent 8b0eb67 commit ea141d8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion wyze_sdk/api/devices/bulbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def set_color(self, *, device_mac: str, device_model: str, color: str, **kwargs)
if device_model not in DeviceModels.MESH_BULB:
raise WyzeFeatureNotSupportedError("set_color")

prop_def = BulbProps.color()()
prop_def = BulbProps.color()
prop_def.validate(color)

return super()._api_client().run_action_list(
Expand Down
2 changes: 1 addition & 1 deletion wyze_sdk/models/devices/bulbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def color(self, value: Union[str, DeviceProp]):
@classmethod
def props(cls) -> dict[str, PropDef]:
return {**Bulb.props(), **{
"color": BulbProps.color()(),
"color": BulbProps.color(),
"remaining_time": BulbProps.remaining_time(),
"control_light": BulbProps.control_light(),
"power_loss_recovery": BulbProps.power_loss_recovery(), # remember_off
Expand Down

0 comments on commit ea141d8

Please sign in to comment.