diff --git a/src/api/mod.rs b/src/api/mod.rs index f9dbf5d..cff0297 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -47,12 +47,52 @@ pub struct Light { #[derive(Debug, Clone, Deserialize)] pub struct LightConfig { - pub archetype: String, + pub archetype: LightArchetype, pub function: String, pub direction: String, 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)] pub struct LightStartupConfig { // TODO: find variants and use enum