Skip to content

Instantly share code, notes, and snippets.

@vikingosegundo
Created November 22, 2021 16:12
Show Gist options
  • Save vikingosegundo/f8b4a0d4a568eb3dddd4474b3f8dd0ae to your computer and use it in GitHub Desktop.
Save vikingosegundo/f8b4a0d4a568eb3dddd4474b3f8dd0ae to your computer and use it in GitHub Desktop.
struct Light:Codable, Equatable, Identifiable {
init(id:String, name:String) { self.init(id, name, .off, 0, 0, 0, 0, .slider, [], .unset) }
enum Mode:Codable { case unset, hsb, ct }
enum Temperature { case mirek(Int) }
let id : String
let name : String
let isOn : Turn
let hue : Double
let saturation: Double
let brightness: Double
let ct : Int
let modes : [Mode]
let selectedMode: Mode
let display : Interface
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment