We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cce999 commit 962a362Copy full SHA for 962a362
src/Traits/Light.php
@@ -92,13 +92,16 @@ public function getBrightnessAndRgb(Device $device)
92
{
93
$this->miIO->send($device, 'get_prop', ['rgb']);
94
95
- return $this->miIO->read($device)->done(function ($response) {
96
- if ($response instanceof Response) {
97
- return dechex($response->getResult()[0]);
98
- }
99
-
100
- return null;
101
- });
+ return $this->miIO->read($device)
+ ->done(function ($response) {
+ if ($response instanceof Response) {
+ return dechex($response->getResult()[0]);
+ }
+
+ return null;
102
+ }, function ($rejected) {
103
+ // TODO: error handling
104
+ });
105
}
106
107
/**
0 commit comments