AutomationPartPath

class AutomationPartPath : HasId


Represents a path to a specific part within a device.

Summary

Public constructors

AutomationPartPath(rootDevice: HomeDevice, partPath: List<DeviceType>)

Public functions

AutomationPartPath?
automationPart(nextDeviceType: DeviceType)

Returns a new AutomationPartPath representing a sub-part within the current deviceType.

Public properties

DeviceType

The DeviceType of the specific part represented by this AutomationPartPath.

open Id

The ID of the container device of the part.

List<DeviceType>

The list of DeviceTypes representing the path in multi-layered device from the top level part to the specific part.

HomeDevice

The root HomeDevice of the path.

Id

The Id representing the type of the device or part.

Public constructors

AutomationPartPath

AutomationPartPath(rootDevice: HomeDevice, partPath: List<DeviceType>)

Public functions

automationPart

fun automationPart(nextDeviceType: DeviceType): AutomationPartPath?

Returns a new AutomationPartPath representing a sub-part within the current deviceType.

Parameters
nextDeviceType: DeviceType

The DeviceType of the sub-part to append to the path.

Returns
AutomationPartPath?

An AutomationPartPath if nextDeviceType is a valid part of the current deviceType, otherwise null.

Public properties

deviceType

val deviceTypeDeviceType

The DeviceType of the specific part represented by this AutomationPartPath. This is the last element in partPath.

id

open val idId

The ID of the container device of the part.

partPath

val partPathList<DeviceType>

The list of DeviceTypes representing the path in multi-layered device from the top level part to the specific part. The list will never be empty, and the last element in the list is the part itself.

rootDevice

val rootDeviceHomeDevice

The root HomeDevice of the path. The DeviceType of the automation is part of the root device.

type

val typeId

The Id representing the type of the device or part.