This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Linkstyle Zigbee Valve for Hubitat/Smartthings | |
* | |
* NOTICE: | |
* Based on Smartthings Tuya valve device definition | |
* Modified to remove auto-off and cleaned up logging and formatting. | |
* Copyright 2020 SmartThings Licensed under the Apache License, Version 2.0 | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | |
* use this file except in compliance with the License. You may obtain a copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val example = when (lightType) { | |
LightBulb -> ... | |
LightStrip -> ... | |
FloodLight -> ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (myLight == LightType.FloodLight) { | |
TODO() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val example = when (myLight) { | |
LightBulb -> TODO() | |
LightStrip -> TODO() | |
FloodLight -> TODO() | |
else -> TODO() // This else is *required* now | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum class LightType { | |
LightBulb, | |
LightStrip, | |
FloodLight, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value class LightType private constructor( | |
private val type: String, | |
) { | |
companion object { | |
val LightBulb = LightType("light_bulb") | |
val LightStrip = LightType("light_strip") | |
val FloodLight = LightType("flood_light") | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value class LightType private constructor( | |
private val type: String, | |
) { | |
companion object { | |
val LightBulb = LightType("light_bulb") | |
val LightStrip = LightType("light_strip") | |
val FloodLight = LightType("flood_light") | |
fun values() = arrayOf(LightBulb, LightStrip, FloodLight) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value class LightType private constructor( | |
private val type: String, | |
) { | |
companion object { | |
val LightBulb = LightType("light_bulb") | |
val LightStrip = LightType("light_strip") | |
val FloodLight = LightType("flood_light") | |
fun values() = arrayOf(LightBulb, LightStrip, FloodLight) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
value class LightType private constructor( | |
private val type: string, | |
) { | |
companion object { | |
val LightBulb = LightType("light_bulb") | |
val LightStrip = LightType("light_strip") | |
val FloodLight = LightType("flood_light") | |
fun values() = arrayOf(LightBulb, LightStrip, FloodLight) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>ANSIBlackColor</key> | |
<data> | |
YnBsaXN0MDDUAQIDBAUGBwpYJHZlcnNpb25ZJGFyY2hpdmVyVCR0b3BYJG9iamVjdHMS | |
AAGGoF8QD05TS2V5ZWRBcmNoaXZlctEICVRyb290gAGmCwwXHR4lVSRudWxs1Q0ODxAR | |
EhMUFRZcTlNDb21wb25lbnRzVU5TUkdCXE5TQ29sb3JTcGFjZV8QEk5TQ3VzdG9tQ29s | |
b3JTcGFjZVYkY2xhc3NPECcwLjEwNTg4MjM1MjkgMC4xMjE1Njg2Mjc1IDAuMTM3MjU0 |
NewerOlder