Hard code the lights controlled by the remote
This commit is contained in:
parent
50c8a413a6
commit
3855439d82
5 changed files with 40 additions and 37 deletions
|
|
@ -40,11 +40,6 @@ type DeviceFriendlyName =
|
|||
match this with
|
||||
| DeviceFriendlyName deviceFriendlyName -> deviceFriendlyName
|
||||
|
||||
type LightControl =
|
||||
| NonRemote
|
||||
| RemoteLeft
|
||||
| RemoteRight
|
||||
|
||||
type Light =
|
||||
| VardagsrumFonsterlampa
|
||||
| VardagsrumVagglampa
|
||||
|
|
@ -55,36 +50,30 @@ type Light =
|
|||
type LightProps =
|
||||
{ FriendlyName: DeviceFriendlyName
|
||||
Room: Room
|
||||
Bulb: Bulb
|
||||
ControlledWithRemote: LightControl }
|
||||
Bulb: Bulb }
|
||||
|
||||
let lightProps light =
|
||||
match light with
|
||||
| VardagsrumFonsterlampa ->
|
||||
{ FriendlyName = DeviceFriendlyName "Vardagsrum - Fönsterlampa"
|
||||
Room = Bedroom
|
||||
Bulb = IkeaBulb
|
||||
ControlledWithRemote = RemoteRight }
|
||||
Bulb = IkeaBulb }
|
||||
| VardagsrumVagglampa ->
|
||||
{ FriendlyName = DeviceFriendlyName "Vardagsrum - Vägglampa"
|
||||
Room = LivingRoom
|
||||
Bulb = PaulmannBulb
|
||||
ControlledWithRemote = NonRemote }
|
||||
Bulb = PaulmannBulb }
|
||||
| VardagsrumGolvlampa ->
|
||||
{ FriendlyName = DeviceFriendlyName "Vardagsrum - Golvlampa"
|
||||
Room = LivingRoom
|
||||
Bulb = PaulmannBulb
|
||||
ControlledWithRemote = NonRemote }
|
||||
Bulb = PaulmannBulb }
|
||||
| BadrumTaklampa ->
|
||||
{ FriendlyName = DeviceFriendlyName "Badrum - Taklampa"
|
||||
Room = Bathroom
|
||||
Bulb = IkeaBulb
|
||||
ControlledWithRemote = NonRemote }
|
||||
Bulb = IkeaBulb }
|
||||
| SovrumNattduksbordlampa ->
|
||||
{ FriendlyName = DeviceFriendlyName "Sovrum - Nattduksbordlampa"
|
||||
Room = Bedroom
|
||||
Bulb = IkeaBulb
|
||||
ControlledWithRemote = RemoteLeft }
|
||||
Bulb = IkeaBulb }
|
||||
|
||||
let lights =
|
||||
[ VardagsrumFonsterlampa
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue