The Govee API .NET client is a lightweight class library to consume Govee developer API V1.8. It provides common services for making API requests.
- .NET 6
- C# language version - 10.0+
Install via NuGet:
// Package Manager
Install-Package GoveeApiClient
// .Net CLI
dotnet add package GoveeApiClient
Instantiate a client
IGoveeApiClient goveeApiClient = new GoveeApiClient("<developer API key here>");
Get devices
var devices = await goveeApiClient.GetDevices();
Get device state
var deviceState = await goveeApiClient.GetDeviceState("DeviceId","DeviceModel");
Turn on/off device
await goveeApiClient.TurnOnDevice("DeviceId","DeviceModel");
await goveeApiClient.TurnOffDevice("DeviceId","DeviceModel");
Set device brightness to 100%
await goveeApiClient.SetDeviceBrightness("DeviceId","DeviceModel", 100);
Set device color to red
var color = new RgbColor
{
R = 255,
G = 0,
B = 0
};
await goveeApiClient.SetDeviceColor("DeviceId","DeviceModel", color);
Set device color temp to 2000
await goveeApiClient.SetDeviceColorTemp("DeviceId","DeviceModel", 2000);
If you find any problems or would like to suggest a feature, please feel free to file an issue on Github at Issues Page.