enumify light architype
This commit is contained in:
parent
3d650cd893
commit
0a42a4fabc
1 changed files with 41 additions and 1 deletions
|
@ -47,12 +47,52 @@ pub struct Light {
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
pub struct LightConfig {
|
pub struct LightConfig {
|
||||||
pub archetype: String,
|
pub archetype: LightArchetype,
|
||||||
pub function: String,
|
pub function: String,
|
||||||
pub direction: String,
|
pub direction: String,
|
||||||
pub startup: LightStartupConfig,
|
pub startup: LightStartupConfig,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
|
#[serde(rename_all = "lowercase")]
|
||||||
|
pub enum LightArchetype {
|
||||||
|
Bollard,
|
||||||
|
Candlebulb,
|
||||||
|
Ceilinground,
|
||||||
|
Ceilingsquare,
|
||||||
|
Christmastree,
|
||||||
|
Classicbulb,
|
||||||
|
Doublespot,
|
||||||
|
Flexiblelamp,
|
||||||
|
Floodbulb,
|
||||||
|
Floorlantern,
|
||||||
|
Floorshade,
|
||||||
|
Groundspot,
|
||||||
|
Huebloom,
|
||||||
|
Huecentris,
|
||||||
|
Huego,
|
||||||
|
Hueiris,
|
||||||
|
Huelightstrip,
|
||||||
|
Huelightstriptv,
|
||||||
|
Hueplay,
|
||||||
|
Pendantlong,
|
||||||
|
Pendantround,
|
||||||
|
Recessedceiling,
|
||||||
|
Recessedfloor,
|
||||||
|
Singlespot,
|
||||||
|
Spotbulb,
|
||||||
|
Sultanbulb,
|
||||||
|
Tableshade,
|
||||||
|
Tablewash,
|
||||||
|
Vintagebulb,
|
||||||
|
Walllantern,
|
||||||
|
Wallshade,
|
||||||
|
Wallspot,
|
||||||
|
|
||||||
|
#[serde(other)]
|
||||||
|
Other,
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug, Clone, Deserialize)]
|
#[derive(Debug, Clone, Deserialize)]
|
||||||
pub struct LightStartupConfig {
|
pub struct LightStartupConfig {
|
||||||
// TODO: find variants and use enum
|
// TODO: find variants and use enum
|
||||||
|
|
Loading…
Reference in a new issue