Skip to content
This repository has been archived by the owner on Jun 20, 2021. It is now read-only.

Commit

Permalink
Add color temperature and hsv abilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan-Langlais committed Apr 2, 2021
1 parent 0ca1a33 commit d741f7b
Show file tree
Hide file tree
Showing 2 changed files with 221 additions and 48 deletions.
14 changes: 11 additions & 3 deletions src/Interfaces/YeePHPInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function getPort(): int;
*
* @return int
*/
public function getBrightness(): int;
public function getBrightness(): string;

/**
* Return the current light color
Expand All @@ -66,10 +66,11 @@ public function toggle(): self;
/**
* Set the color of the light
*
* @param int $hexColor The light color in hexadecimal (eg: 0xFFFFFF)
* @param int $color The light color value in hexadecimal, color temperature or hue (eg: 0xFFFFFF)
* @param array $params The parameters for the color change.
* @return $this
*/
public function setColor(int $hexColor): self;
public function setColor(int $color, array $params): self;

/**
* Define the desired light brightness.
Expand All @@ -95,6 +96,13 @@ public function setName(string $name): self;
*/
public function setPower(string $power): self;

/**
* Save the current state to the device memory
*
* @return $this
*/
public function setDefault(): self;

/**
* Send the parameters to the light.
* @return bool
Expand Down
Loading

0 comments on commit d741f7b

Please sign in to comment.