Interface KobotHAEntity
-
- All Implemented Interfaces:
-
kotlin.Comparable
public interface KobotHAEntity implements Comparable<KobotHAEntity>
Defines the "device" for MQTT discovery and state messages.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public class
KobotHAEntity.Companion
-
Method Summary
Modifier and Type Method Description abstract JSONObject
discovery()
Generate the MQTT discovery message for this device. abstract String
currentState()
Generate the MQTT state message for this device. Integer
compareTo(KobotHAEntity other)
abstract String
getUniqueId()
The unique ID of the device. abstract String
getName()
The friendly name of the device. abstract String
getComponent()
The Home Assistant classification of the device (e.g. abstract DeviceIdentifier
getDeviceIdentifier()
More detailed information about the device. abstract String
getIcon()
The icon HA will use to display this entity. -
-
Method Detail
-
discovery
abstract JSONObject discovery()
Generate the MQTT discovery message for this device.
NOTE This should be modified by each entity for its special cases.
-
currentState
abstract String currentState()
Generate the MQTT state message for this device.
-
compareTo
Integer compareTo(KobotHAEntity other)
-
getUniqueId
abstract String getUniqueId()
The unique ID of the device. NOTE If this is not unique across all devices, then HomeAssistant will throw an error on discovery, but it wont be seen here.
-
getName
abstract String getName()
The friendly name of the device. This may be renamed in the HomeAssistant UI.
-
getComponent
abstract String getComponent()
The Home Assistant classification of the device (e.g. light, switch, etc.)
-
getDeviceIdentifier
abstract DeviceIdentifier getDeviceIdentifier()
More detailed information about the device.
-
-
-
-