Home Assistant Api Client
The client object for interacting with the Home Assistant WebSocket API.
Functions
Link copied to clipboard
abstract fun <ED> attachEventHandler(eventType: EventType, eventDataType: KClass<*>, eventHandler: EventHandlerFunction<ED>): Switchable
Content copied to clipboard
Attaches an EventHandlerFunction to the API client and starts the Home Assistant event subscription.
Link copied to clipboard
abstract fun setErrorResponseHandler(errorResponseHandler: (ErrorResponseData) -> Unit)
Content copied to clipboard
Attaches an error response handler to the API client.
Link copied to clipboard
Overwrites the default event handler exception handler action.
Properties
Extensions
Link copied to clipboard
inline fun <ED> HomeAssistantApiClient.attachEventHandler(eventType: EventType, noinline eventHandler: EventHandlerFunction<ED>): Switchable
Content copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.attachIosActionHandler(eventHandler: EventHandlerFunction<IosActionEventData>): Switchable
Content copied to clipboard
Link copied to clipboard
fun <AD> HomeAssistantApiClient.attachIosNotificationActionHandler(eventHandler: EventHandlerFunction<IosNotificationActionEventData<AD>>): Switchable
Content copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.ContactSensor(objectId: ObjectId): ContactSensor
Content copied to clipboard
Link copied to clipboard
suspend fun HomeAssistantApiClient.createPersistentNotification(message: String, title: String? = null, notificationId: String? = null): Int
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.DimmableLight(objectId: ObjectId): DimmableLight
Content copied to clipboard
Link copied to clipboard
suspend fun HomeAssistantApiClient.dismissPersistentNotification(id: String): Int
Content copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.InputBoolean(objectId: ObjectId): InputBoolean
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.InputDateTime(objectId: ObjectId): InputDateTime
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.LuminanceSensor(objectId: ObjectId): LuminanceSensor
Content copied to clipboard
Link copied to clipboard
suspend fun HomeAssistantApiClient.markPersistentNotificationAsRead(id: String): Int
Content copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.MediaReceiver(objectId: ObjectId): MediaReceiver
Content copied to clipboard
fun HomeAssistantApiClient.MediaReceiver(entityId: EntityId): MediaReceiver
Content copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.MotionSensor(objectId: ObjectId): MotionSensor
Content copied to clipboard
Link copied to clipboard
suspend fun HomeAssistantApiClient.notifyMobileApp(device: Device, message: String, title: String? = null): Int
Content copied to clipboard
suspend fun HomeAssistantApiClient.notifyMobileApp(device: Device, messageBuilder: MobileNotificationData.() -> Unit): Int
Content copied to clipboard
suspend fun HomeAssistantApiClient.notifyMobileApp(vararg devices: Device, title: String, message: String)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.PositionableCover(objectId: ObjectId): PositionableCover
Content copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.PowerMeasuringSwitch(objectId: ObjectId): PowerSwitch
Content copied to clipboard
Link copied to clipboard
suspend fun HomeAssistantApiClient.requestLocationUpdate(device: Device): Int
Content copied to clipboard
suspend fun HomeAssistantApiClient.requestLocationUpdate(vararg devices: Device)
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun HomeAssistantApiClient.SwitchableLight(objectId: ObjectId): SwitchableLight
Content copied to clipboard
Link copied to clipboard
Link copied to clipboard