diff --git a/build.gradle.kts b/build.gradle.kts index a16daa9f..7ec44b61 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -19,6 +19,7 @@ dependencies { dokka(project(":homekit")) dokka(project(":internals")) dokka(project(":lights")) + dokka(project(":lightlevel")) dokka(project(":resources")) dokka(project(":rooms")) dokka(project(":scenes")) diff --git a/button/api/button.api b/button/api/button.api index b1adc3bd..1056e1c9 100644 --- a/button/api/button.api +++ b/button/api/button.api @@ -49,10 +49,10 @@ public final class inkapplications/shade/button/structures/Button { public final fun copy-qm0Ps9A (Ljava/lang/String;Linkapplications/shade/structures/ResourceReference;Linkapplications/shade/button/structures/ButtonMetadata;Linkapplications/shade/button/structures/ButtonState;Ljava/lang/String;)Linkapplications/shade/button/structures/Button; public static synthetic fun copy-qm0Ps9A$default (Linkapplications/shade/button/structures/Button;Ljava/lang/String;Linkapplications/shade/structures/ResourceReference;Linkapplications/shade/button/structures/ButtonMetadata;Linkapplications/shade/button/structures/ButtonState;Ljava/lang/String;ILjava/lang/Object;)Linkapplications/shade/button/structures/Button; public fun equals (Ljava/lang/Object;)Z - public final fun getButton ()Linkapplications/shade/button/structures/ButtonState; public final fun getId-XbiYvy0 ()Ljava/lang/String; public final fun getMetadata ()Linkapplications/shade/button/structures/ButtonMetadata; public final fun getOwner ()Linkapplications/shade/structures/ResourceReference; + public final fun getState ()Linkapplications/shade/button/structures/ButtonState; public final fun getType-1y3a6N0 ()Ljava/lang/String; public fun hashCode ()I public fun toString ()Ljava/lang/String; @@ -167,18 +167,17 @@ public final class inkapplications/shade/button/structures/ButtonReport$Companio public final class inkapplications/shade/button/structures/ButtonState { public static final field Companion Linkapplications/shade/button/structures/ButtonState$Companion; - public fun ()V - public fun (Linkapplications/shade/button/structures/ButtonReport;Ljava/lang/Integer;Ljava/util/List;)V - public synthetic fun (Linkapplications/shade/button/structures/ButtonReport;Ljava/lang/Integer;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Linkapplications/shade/button/structures/ButtonReport;Lkotlin/time/Duration;Ljava/util/List;ILkotlin/jvm/internal/DefaultConstructorMarker;)V + public synthetic fun (Linkapplications/shade/button/structures/ButtonReport;Lkotlin/time/Duration;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun component1 ()Linkapplications/shade/button/structures/ButtonReport; - public final fun component2 ()Ljava/lang/Integer; + public final fun component2-FghU774 ()Lkotlin/time/Duration; public final fun component3 ()Ljava/util/List; - public final fun copy (Linkapplications/shade/button/structures/ButtonReport;Ljava/lang/Integer;Ljava/util/List;)Linkapplications/shade/button/structures/ButtonState; - public static synthetic fun copy$default (Linkapplications/shade/button/structures/ButtonState;Linkapplications/shade/button/structures/ButtonReport;Ljava/lang/Integer;Ljava/util/List;ILjava/lang/Object;)Linkapplications/shade/button/structures/ButtonState; + public final fun copy-Kx4hsE0 (Linkapplications/shade/button/structures/ButtonReport;Lkotlin/time/Duration;Ljava/util/List;)Linkapplications/shade/button/structures/ButtonState; + public static synthetic fun copy-Kx4hsE0$default (Linkapplications/shade/button/structures/ButtonState;Linkapplications/shade/button/structures/ButtonReport;Lkotlin/time/Duration;Ljava/util/List;ILjava/lang/Object;)Linkapplications/shade/button/structures/ButtonState; public fun equals (Ljava/lang/Object;)Z - public final fun getButtonReport ()Linkapplications/shade/button/structures/ButtonReport; - public final fun getEventValues ()Ljava/util/List; - public final fun getRepeatInterval ()Ljava/lang/Integer; + public final fun getEvents ()Ljava/util/List; + public final fun getRepeatInterval-FghU774 ()Lkotlin/time/Duration; + public final fun getReport ()Linkapplications/shade/button/structures/ButtonReport; public fun hashCode ()I public fun toString ()Ljava/lang/String; } diff --git a/button/src/commonMain/kotlin/inkapplications/shade/button/structures/Button.kt b/button/src/commonMain/kotlin/inkapplications/shade/button/structures/Button.kt index e2d9fc22..4d9e49b3 100644 --- a/button/src/commonMain/kotlin/inkapplications/shade/button/structures/Button.kt +++ b/button/src/commonMain/kotlin/inkapplications/shade/button/structures/Button.kt @@ -3,7 +3,6 @@ package inkapplications.shade.button.structures import inkapplications.shade.structures.ResourceId import inkapplications.shade.structures.ResourceReference import inkapplications.shade.structures.ResourceType -import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable /** @@ -31,7 +30,7 @@ data class Button( /** * Button state and configuration. */ - val button: ButtonState, + val state: ButtonState, /** * Type of the supported resources. diff --git a/button/src/commonMain/kotlin/inkapplications/shade/button/structures/ButtonState.kt b/button/src/commonMain/kotlin/inkapplications/shade/button/structures/ButtonState.kt index f8838737..7a9d05d1 100644 --- a/button/src/commonMain/kotlin/inkapplications/shade/button/structures/ButtonState.kt +++ b/button/src/commonMain/kotlin/inkapplications/shade/button/structures/ButtonState.kt @@ -1,7 +1,9 @@ package inkapplications.shade.button.structures +import inkapplications.shade.serialization.MillisecondDurationSerializer import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable +import kotlin.time.Duration /** * State of the button with last event and configuration. @@ -12,17 +14,18 @@ data class ButtonState( * Report of the last button event with timestamp. */ @SerialName("button_report") - val buttonReport: ButtonReport? = null, + val report: ButtonReport? = null, /** * Duration between repeat events when holding the button in milliseconds. */ @SerialName("repeat_interval") - val repeatInterval: Int? = null, + @Serializable(with = MillisecondDurationSerializer::class) + val repeatInterval: Duration? = null, /** * List of all button events that this device supports. */ @SerialName("event_values") - val eventValues: List? = null, + val events: List = emptyList(), ) diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/Main.kt b/cli/src/main/kotlin/inkapplications/shade/cli/Main.kt index 7926656f..bc2188d5 100644 --- a/cli/src/main/kotlin/inkapplications/shade/cli/Main.kt +++ b/cli/src/main/kotlin/inkapplications/shade/cli/Main.kt @@ -2,6 +2,7 @@ package inkapplications.shade.cli import com.github.ajalt.clikt.core.NoOpCliktCommand import com.github.ajalt.clikt.core.subcommands +import inkapplications.shade.cli.buttons.* import inkapplications.shade.cli.connection.AuthorizeCommand import inkapplications.shade.cli.connection.DiscoverCommand import inkapplications.shade.cli.devices.* @@ -9,6 +10,8 @@ import inkapplications.shade.cli.events.EventsCommand import inkapplications.shade.cli.groupedlights.GetGroupedLightCommand import inkapplications.shade.cli.groupedlights.ListGroupedLightsCommand import inkapplications.shade.cli.groupedlights.UpdateGroupedLightCommand +import inkapplications.shade.cli.homekit.* +import inkapplications.shade.cli.lightlevels.* import inkapplications.shade.cli.lights.GetLightCommand import inkapplications.shade.cli.lights.ListLightsCommand import inkapplications.shade.cli.lights.UpdateLightCommand @@ -31,23 +34,32 @@ class Main: NoOpCliktCommand() { DeleteZoneCommand, DiscoverCommand, EventsCommand, + GetButtonCommand, GetDeviceCommand, GetGroupedLightCommand, + GetHomekitCommand, GetLightCommand, + GetLightLevelCommand, GetRoomCommand, GetSceneCommand, GetZoneCommand, IdentifyDeviceCommand, + ListButtonsCommand, ListDevicesCommand, ListGroupedLightsCommand, + ListHomekitCommand, ListLightsCommand, + ListLightLevelsCommand, ListResourcesCommand, ListRoomsCommand, ListScenesCommand, ListZonesCommand, + UpdateButtonCommand, UpdateDeviceCommand, UpdateGroupedLightCommand, + UpdateHomekitCommand, UpdateLightCommand, + UpdateLightLevelCommand, UpdateRoomCommand, UpdateSceneCommand, UpdateZoneCommand, diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/buttons/ButtonOutput.kt b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/ButtonOutput.kt new file mode 100644 index 00000000..f6f7829a --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/ButtonOutput.kt @@ -0,0 +1,23 @@ +package inkapplications.shade.cli.buttons + +import com.github.ajalt.clikt.core.CliktCommand +import inkapplications.shade.button.structures.Button + +fun CliktCommand.echoButton(button: Button) { + echo("${button.id.value}:") + echo(" Owner: ${button.owner}") + echo(" Control ID: ${button.metadata.controlId}") + val report = button.state.report + if (report != null) { + echo(" Last Event: ${report.event}") + echo(" Updated: ${report.updated}") + } + val repeatInterval = button.state.repeatInterval + if (repeatInterval != null) { + echo(" Repeat Interval: ${repeatInterval}ms") + } + echo(" Events:") + button.state.events.forEach { event -> + echo(" - $event") + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/buttons/GetButtonCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/GetButtonCommand.kt new file mode 100644 index 00000000..1d935e8a --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/GetButtonCommand.kt @@ -0,0 +1,20 @@ +package inkapplications.shade.cli.buttons + +import com.github.ajalt.clikt.parameters.arguments.argument +import inkapplications.shade.cli.AuthorizedShadeCommand +import inkapplications.shade.cli.resourceId + +object GetButtonCommand: AuthorizedShadeCommand( + help = "Get data for a specific button" +) { + private val buttonId by argument().resourceId() + + override suspend fun runCommand(): Int { + val button = shade.buttons.getButton(buttonId) + + logger.debug("Got Button: $button") + echoButton(button) + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/buttons/ListButtonsCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/ListButtonsCommand.kt new file mode 100644 index 00000000..893d4925 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/ListButtonsCommand.kt @@ -0,0 +1,16 @@ +package inkapplications.shade.cli.buttons + +import inkapplications.shade.cli.AuthorizedShadeCommand + +object ListButtonsCommand: AuthorizedShadeCommand( + help = "Get all of the buttons configured on the Hue bridge" +) { + override suspend fun runCommand(): Int { + val buttons = shade.buttons.listButtons() + + logger.debug("Got Buttons: $buttons") + buttons.forEach(::echoButton) + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/buttons/UpdateButtonCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/UpdateButtonCommand.kt new file mode 100644 index 00000000..d707eccc --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/buttons/UpdateButtonCommand.kt @@ -0,0 +1,28 @@ +package inkapplications.shade.cli.buttons + +import com.github.ajalt.clikt.parameters.arguments.argument +import inkapplications.shade.button.parameters.ButtonUpdateParameters +import inkapplications.shade.cli.AuthorizedShadeCommand +import inkapplications.shade.cli.resourceId +import inkapplications.shade.structures.ResourceType + +object UpdateButtonCommand: AuthorizedShadeCommand( + help = "Update an existing button on the Hue bridge" +) { + private val buttonId by argument( + help = "The ID of the button resource to be updated" + ).resourceId() + + override suspend fun runCommand(): Int { + val response = shade.buttons.updateButton( + id = buttonId, + parameters = ButtonUpdateParameters( + type = ResourceType.Button, + ), + ) + + logger.debug("Got response $response") + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/homekit/GetHomekitCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/GetHomekitCommand.kt new file mode 100644 index 00000000..9df3d8e9 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/GetHomekitCommand.kt @@ -0,0 +1,20 @@ +package inkapplications.shade.cli.homekit + +import com.github.ajalt.clikt.parameters.arguments.argument +import inkapplications.shade.cli.AuthorizedShadeCommand +import inkapplications.shade.cli.resourceId + +object GetHomekitCommand: AuthorizedShadeCommand( + help = "Get data for a specific homekit resource" +) { + private val homekitId by argument().resourceId() + + override suspend fun runCommand(): Int { + val homekit = shade.homekit.getHomekit(homekitId) + + logger.debug("Got Homekit: $homekit") + echoHomekit(homekit) + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/homekit/HomekitOutput.kt b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/HomekitOutput.kt new file mode 100644 index 00000000..9acf33e1 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/HomekitOutput.kt @@ -0,0 +1,10 @@ +package inkapplications.shade.cli.homekit + +import com.github.ajalt.clikt.core.CliktCommand +import inkapplications.shade.homekit.structures.Homekit + +fun CliktCommand.echoHomekit(homekit: Homekit) { + echo("${homekit.id.value}:") + echo(" Type: ${homekit.type}") + echo(" Status: ${homekit.status}") +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/homekit/ListHomekitCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/ListHomekitCommand.kt new file mode 100644 index 00000000..5596ec1a --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/ListHomekitCommand.kt @@ -0,0 +1,16 @@ +package inkapplications.shade.cli.homekit + +import inkapplications.shade.cli.AuthorizedShadeCommand + +object ListHomekitCommand: AuthorizedShadeCommand( + help = "Get all of the homekit resources configured on the Hue bridge" +) { + override suspend fun runCommand(): Int { + val homekitResources = shade.homekit.listHomekit() + + logger.debug("Got Homekit: $homekitResources") + homekitResources.forEach(::echoHomekit) + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/homekit/UpdateHomekitCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/UpdateHomekitCommand.kt new file mode 100644 index 00000000..c8ddf4a3 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/homekit/UpdateHomekitCommand.kt @@ -0,0 +1,43 @@ +package inkapplications.shade.cli.homekit + +import com.github.ajalt.clikt.parameters.arguments.argument +import com.github.ajalt.clikt.parameters.options.option +import com.github.ajalt.clikt.parameters.types.enum +import inkapplications.shade.cli.AuthorizedShadeCommand +import inkapplications.shade.cli.resourceId +import inkapplications.shade.homekit.parameters.HomekitUpdateParameters +import inkapplications.shade.homekit.structures.HomekitAction + +object UpdateHomekitCommand: AuthorizedShadeCommand( + help = "Invoke an action on a homekit resource" +) { + private val homekitId by argument( + help = "The ID of the homekit resource to be updated" + ).resourceId() + + private val action by option( + help = "Invoke an action on the homekit resource" + ).enum() + + override suspend fun runCommand(): Int { + val action = when(action) { + Actions.Reset -> HomekitAction.Reset + else -> null + } + + val response = shade.homekit.updateHomekit( + id = homekitId, + parameters = HomekitUpdateParameters( + action = action, + ), + ) + + logger.debug("Got response $response") + + return 0 + } + + private enum class Actions { + Reset + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/GetLightLevelCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/GetLightLevelCommand.kt new file mode 100644 index 00000000..7467a293 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/GetLightLevelCommand.kt @@ -0,0 +1,20 @@ +package inkapplications.shade.cli.lightlevels + +import com.github.ajalt.clikt.parameters.arguments.argument +import inkapplications.shade.cli.AuthorizedShadeCommand +import inkapplications.shade.cli.resourceId + +object GetLightLevelCommand: AuthorizedShadeCommand( + help = "Get data for a specific light level sensor" +) { + private val lightLevelId by argument().resourceId() + + override suspend fun runCommand(): Int { + val lightLevel = shade.lightLevels.getLightLevel(lightLevelId) + + logger.debug("Got Light Level: $lightLevel") + echoLightLevel(lightLevel) + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/LightLevelOutput.kt b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/LightLevelOutput.kt new file mode 100644 index 00000000..3af4ffc5 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/LightLevelOutput.kt @@ -0,0 +1,16 @@ +package inkapplications.shade.cli.lightlevels + +import com.github.ajalt.clikt.core.CliktCommand +import inkapplications.shade.lightlevel.structures.LightLevel + +fun CliktCommand.echoLightLevel(lightLevel: LightLevel) { + echo("${lightLevel.id.value}:") + echo(" Owner: ${lightLevel.owner}") + echo(" Enabled: ${lightLevel.enabled}") + + val report = lightLevel.light.lightLevelReport + if (report != null) { + echo(" Level: ${report.lightLevel}") + echo(" Changed: ${report.changed}") + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/ListLightLevelsCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/ListLightLevelsCommand.kt new file mode 100644 index 00000000..5da8ff2d --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/ListLightLevelsCommand.kt @@ -0,0 +1,16 @@ +package inkapplications.shade.cli.lightlevels + +import inkapplications.shade.cli.AuthorizedShadeCommand + +object ListLightLevelsCommand: AuthorizedShadeCommand( + help = "Get all of the light level sensors configured on the Hue bridge" +) { + override suspend fun runCommand(): Int { + val lightLevels = shade.lightLevels.listLightLevels() + + logger.debug("Got Light Levels: $lightLevels") + lightLevels.forEach(::echoLightLevel) + + return 0 + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/UpdateLightLevelCommand.kt b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/UpdateLightLevelCommand.kt new file mode 100644 index 00000000..4ae92d24 --- /dev/null +++ b/cli/src/main/kotlin/inkapplications/shade/cli/lightlevels/UpdateLightLevelCommand.kt @@ -0,0 +1,44 @@ +package inkapplications.shade.cli.lightlevels + +import com.github.ajalt.clikt.parameters.arguments.argument +import com.github.ajalt.clikt.parameters.options.option +import com.github.ajalt.clikt.parameters.types.enum +import inkapplications.shade.cli.AuthorizedShadeCommand +import inkapplications.shade.cli.resourceId +import inkapplications.shade.lightlevel.parameters.LightLevelUpdateParameters + +object UpdateLightLevelCommand: AuthorizedShadeCommand( + help = "Update a light level sensor on the Hue bridge" +) { + private val lightLevelId by argument( + help = "The ID of the light level sensor to be updated" + ).resourceId() + + private val enable by option( + help = "Enable the light level sensor" + ).enum() + + override suspend fun runCommand(): Int { + val enabled = when(enable) { + EnableState.Enable -> true + EnableState.Disable -> false + null -> null + } + + val response = shade.lightLevels.updateLightLevel( + id = lightLevelId, + parameters = LightLevelUpdateParameters( + enabled = enabled, + ), + ) + + logger.debug("Got response $response") + + return 0 + } + + enum class EnableState { + Enable, + Disable + } +} diff --git a/cli/src/main/kotlin/inkapplications/shade/cli/rooms/RoomOutput.kt b/cli/src/main/kotlin/inkapplications/shade/cli/rooms/RoomOutput.kt index 3ba802c4..fa8b6dae 100644 --- a/cli/src/main/kotlin/inkapplications/shade/cli/rooms/RoomOutput.kt +++ b/cli/src/main/kotlin/inkapplications/shade/cli/rooms/RoomOutput.kt @@ -1,7 +1,6 @@ package inkapplications.shade.cli.rooms import com.github.ajalt.clikt.core.CliktCommand -import com.github.ajalt.clikt.output.TermUi import inkapplications.shade.rooms.structures.Room fun CliktCommand.echoRoom(room: Room) { diff --git a/core/api/core.api b/core/api/core.api index 4decccbc..f128c073 100644 --- a/core/api/core.api +++ b/core/api/core.api @@ -8,6 +8,7 @@ public final class inkapplications/shade/core/Shade { public fun (Ljava/lang/String;Linkapplications/shade/structures/AuthToken;Linkapplications/shade/structures/SecurityStrategy;Lkimchi/logger/KimchiLogger;)V public synthetic fun (Ljava/lang/String;Linkapplications/shade/structures/AuthToken;Linkapplications/shade/structures/SecurityStrategy;Lkimchi/logger/KimchiLogger;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public final fun getAuth ()Linkapplications/shade/auth/BridgeAuth; + public final fun getButtons ()Linkapplications/shade/button/ButtonControls; public final fun getConfiguration ()Linkapplications/shade/structures/HueConfigurationContainer; public final fun getDevices ()Linkapplications/shade/devices/DeviceControls; public final fun getGroupedLights ()Linkapplications/shade/groupedlights/GroupedLightControls; diff --git a/core/build.gradle.kts b/core/build.gradle.kts index ee6253b3..8735e248 100644 --- a/core/build.gradle.kts +++ b/core/build.gradle.kts @@ -9,10 +9,12 @@ kotlin { dependencies { implementation(projects.internals) api(projects.auth) + api(projects.button) api(projects.discover) api(projects.devices) api(projects.events) api(projects.groupedLights) + api(projects.homekit) api(projects.lights) api(projects.lightlevel) api(projects.resources) @@ -20,7 +22,6 @@ kotlin { api(projects.scenes) api(projects.structures) api(projects.zones) - api(projects.homekit) api(libs.kimchi.logger) } diff --git a/core/src/commonMain/kotlin/inkapplications/shade/core/Shade.kt b/core/src/commonMain/kotlin/inkapplications/shade/core/Shade.kt index 12bec380..7d764954 100644 --- a/core/src/commonMain/kotlin/inkapplications/shade/core/Shade.kt +++ b/core/src/commonMain/kotlin/inkapplications/shade/core/Shade.kt @@ -1,6 +1,7 @@ package inkapplications.shade.core import inkapplications.shade.auth.AuthModule +import inkapplications.shade.button.ShadeButtonsModule import inkapplications.shade.devices.ShadeDevicesModule import inkapplications.shade.discover.DiscoverModule import inkapplications.shade.events.EventsModule @@ -52,6 +53,7 @@ class Shade( internalsModule = internalsModule, logger = logger, ).bridgeAuth + val buttons = ShadeButtonsModule(internalsModule).buttons val devices = ShadeDevicesModule(internalsModule).devices val lights = ShadeLightsModule(internalsModule, eventsModule).lights val lightLevels = ShadeLightLevelModule(internalsModule).lightLevels diff --git a/docs/reference/latest/auth/navigation.html b/docs/reference/latest/auth/navigation.html index f364f078..d71c5de6 100644 --- a/docs/reference/latest/auth/navigation.html +++ b/docs/reference/latest/auth/navigation.html @@ -374,11 +374,11 @@ -
+ +
lightsSkip to content @@ -1102,152 +1152,207 @@ AuthToken
-
+
+ +
+
+ +
+
+ +
+ -
+ -
+
+ +
+ -
+ -
+ -
+
+
+ Lux +
+
+
+
+ lux +
+
+ -
+ -
+ -
+ -
+ -
+ -
+
- -
+
-
+
+
+
+ scaledLux +
+
+ +
+ + -
+ -
+ - -
+
- -
+ -
+ -
+ -
+ -
+
+ +
+
+ +
+ -
+ -
+ -
+ -
+ -
+
diff --git a/docs/reference/latest/button/inkapplications.shade.button.structures/-button-state/-button-state.html b/docs/reference/latest/button/inkapplications.shade.button.structures/-button-state/-button-state.html index 071a4e5c..be7e87d8 100644 --- a/docs/reference/latest/button/inkapplications.shade.button.structures/-button-state/-button-state.html +++ b/docs/reference/latest/button/inkapplications.shade.button.structures/-button-state/-button-state.html @@ -90,12 +90,12 @@
-
+

ButtonState

-
constructor(buttonReport: ButtonReport? = null, repeatInterval: Int? = null, eventValues: List<ButtonEvent>? = null)
+
constructor(report: ButtonReport? = null, repeatInterval: Duration? = null, events: List<ButtonEvent> = emptyList())