-
Notifications
You must be signed in to change notification settings - Fork 0
/
HueProperties.cs
36 lines (31 loc) · 1002 Bytes
/
HueProperties.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
namespace Alerting.Function
{
public class HueProperties
{
// By default bool is set to false, but we don't want to take a chance :)
public bool on { get; set; } = false;
public int bri { get; set; }
public int hue { get; set; }
public int sat { get; set; }
// Method to set the color depending on the parameter value provided. Returns the object
public HueProperties SetColor(string color)
{
var properties = new HueProperties();
if (color == "green")
{
properties.bri = 254;
properties.hue = 23456;
properties.sat = 254;
properties.on = true;
}
if (color == "red")
{
properties.bri = 254;
properties.hue = 908;
properties.sat = 254;
properties.on = true;
}
return properties;
}
}
}