Comments (8)
This is I lazy fix the code but I still have issue as if it can be 1 or 0 the light will always go off but the state in the control center is on or off
if($On){$Power = 1}else{$Power = 0}
$Body = @{
NumberOfLights = 1
Lights = @(
@{
Brightness = $Brightness
Temperature = $Temperature
On = $Power
}
)
from elgato.
Hi Simon, I would recommend either uninstalling Control Center or disabling it in your Windows startup tasks. It sounds like Control Center is conflicting with, and overriding the direct API interface.
Let me see if I can fix the import error.
from elgato.
I can't seem to reproduce the import error you're seeing on PowerShell version 7.0.3. Which version of PowerShell are you using?
Keep in mind that the ternary operator is only available in PowerShell version 7, so that's probably why you're getting that error. I can set the minimum version of PowerShell in the manifest.
from elgato.
from elgato.
I fixed the minimum PowerShell version in this commit: f7a4d08
Now on PowerShell 5.1 Desktop Edition, you'll see this error message.
ipmo : The version of Windows PowerShell on this computer is '5.1.19041.1'. The module 'C:\Users\TrevorSullivan\git\elgato\elgato.psd1' requires a minimum Windows PowerShell version of '7.0' to run. Verify that you have the minimum required version of Windows PowerShell installed, and then try again.
At line:1 char:1
+ ipmo .\elgato.psd1
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ResourceUnavailable: (C:\Users\Trevor...ato\elgato.psd1:String) [Import-Module], InvalidOperationException
+ FullyQualifiedErrorId : Modules_InsufficientPowerShellVersion,Microsoft.PowerShell.Commands.ImportModuleCommand
from elgato.
The easiest way to get PowerShell version 7 is to docker pull microsoft/powershell
, assuming you have Docker Desktop installed. I look forward to hearing your results. Thanks for reporting the issue, by the way!
from elgato.
from elgato.
Yup, it's already in the module manifest. Thanks for confirming.
from elgato.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elgato.