Package com.codellyrandom.hassle.extending.entities.actuators.light

Types

Link copied to clipboard
typealias DimmableLight = Actuator<DimmableLightState, LightAttributes>
Link copied to clipboard
data class DimmableLightState(value: SwitchableValue, brightness: Brightness?) : State<SwitchableValue>
Link copied to clipboard
data class LightAttributes(supportedFeatures: Int, userId: UserId?, friendlyName: FriendlyName, lastChanged: Instant, lastUpdated: Instant) : Attributes
Link copied to clipboard
typealias RGBLight = Actuator<RGBLightState, LightAttributes>
Link copied to clipboard
data class RGBLightState(value: SwitchableValue, brightness: Brightness?, hsColor: HSColor?, rgbColor: RGBColor?, xyColor: XYColor?) : State<SwitchableValue>
Link copied to clipboard
typealias RGBWLight = Actuator<RGBWLightState, LightAttributes>
Link copied to clipboard
data class RGBWLightState(value: SwitchableValue, brightness: Brightness?, hsColor: HSColor?, rgbColor: RGBColor?, xyColor: XYColor?, colorTemp: ColorTemperature?) : State<SwitchableValue>
Link copied to clipboard
typealias SwitchableLight = Actuator<SwitchableState, LightAttributes>

Functions

Link copied to clipboard
fun HomeAssistantApiClient.DimmableLight(objectId: ObjectId): DimmableLight
Link copied to clipboard
fun DimmableLight.onTurnedOff(f: DimmableLight.(Switchable) -> Unit): Switchable
fun RGBLight.onTurnedOff(f: RGBLight.(Switchable) -> Unit): Switchable
fun RGBWLight.onTurnedOff(f: RGBWLight.(Switchable) -> Unit): Switchable
Link copied to clipboard
fun DimmableLight.onTurnedOn(f: DimmableLight.(Switchable) -> Unit): Switchable
fun RGBLight.onTurnedOn(f: RGBLight.(Switchable) -> Unit): Switchable
fun RGBWLight.onTurnedOn(f: RGBWLight.(Switchable) -> Unit): Switchable
Link copied to clipboard
fun HomeAssistantApiClient.RGBLight(objectId: ObjectId): RGBLight
Link copied to clipboard
fun HomeAssistantApiClient.RGBWLight(objectId: ObjectId): RGBWLight
Link copied to clipboard
suspend fun DimmableLight.setBrightness(level: Brightness)
suspend fun RGBLight.setBrightness(level: Brightness)
suspend fun RGBWLight.setBrightness(level: Brightness)
Link copied to clipboard
suspend fun RGBLight.setColor(name: ColorName): Int
suspend fun RGBWLight.setColor(name: ColorName): Int
Link copied to clipboard
suspend fun RGBWLight.setColorTemperature(temperature: ColorTemperature)
Link copied to clipboard
suspend fun RGBLight.setHS(hue: Double, saturation: Double)
suspend fun RGBWLight.setHS(hue: Double, saturation: Double)
Link copied to clipboard
suspend fun RGBLight.setRGB(red: Int, green: Int, blue: Int)
suspend fun RGBWLight.setRGB(red: Int, green: Int, blue: Int)
Link copied to clipboard
suspend fun RGBLight.setXY(x: Double, y: Double)
suspend fun RGBWLight.setXY(x: Double, y: Double)
Link copied to clipboard
fun HomeAssistantApiClient.SwitchableLight(objectId: ObjectId): SwitchableLight
Link copied to clipboard
suspend fun DimmableLight.turnOff()
suspend fun RGBLight.turnOff()
suspend fun RGBWLight.turnOff()
Link copied to clipboard
suspend fun DimmableLight.turnOn()
suspend fun RGBLight.turnOn()
suspend fun RGBWLight.turnOn()

Properties

Link copied to clipboard
val DimmableLight.isOff: Boolean
Link copied to clipboard
val RGBLight.isOff: Boolean
Link copied to clipboard
val RGBWLight.isOff: Boolean
Link copied to clipboard
val DimmableLight.isOn: Boolean
Link copied to clipboard
val RGBLight.isOn: Boolean
Link copied to clipboard
val RGBWLight.isOn: Boolean