mqtt-discovery-types
Version:
Typescript Types For HomeAssistant MQTT Discovery
55 lines (45 loc) • 1.42 kB
TypeScript
export interface DeviceDiscovery {
/**
* A link to the web page where the device can be configured. Can be either a `http://`, `https:` or an internal `homeasssitant://` URL.
*/
configuration_url?: string;
/**
* A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`.
* For example the MAC address of a network interface: `connections: [["mac", "02:5b:26:a8:dc:12"]]`
*/
connections?: string[][];
/**
* The hardware version of the device.
*/
hw_version?: string;
/**
* A list of identifiers that uniquely identify the device. For example a serial number.
*/
identifiers?: string[];
/**
* The manufacturer of the device.
*/
manufacturer?: string;
/**
* The model of the device.
*/
model?: string;
/**
* The name of the device.
*/
name?: string;
/**
* Suggest an area if the device isn't assigned to one yet.
*/
suggested_area?: string;
/**
* The firmware version of the device.
*/
sw_version?: string;
/**
* Identifier of a device that routes messages between this device and Home Assistant.
* Examples of such devices are hubs, or parent devices of a sub-device.
* This is used to show device topology in Home Assistant.
*/
via_device?: string;
}