From 09b98321a14352db094d3bbc4f3fca2ef5db1fa9 Mon Sep 17 00:00:00 2001 From: Adrian Jagielak Date: Thu, 24 Jul 2025 16:03:53 +0200 Subject: [PATCH] Remove unnecessary MQTT components interface fields --- futurehome/config.yaml | 2 +- .../ha/mqtt_components/alarm_control_panel.ts | 123 ---------------- .../src/ha/mqtt_components/binary_sensor.ts | 125 ---------------- futurehome/src/ha/mqtt_components/button.ts | 123 ---------------- futurehome/src/ha/mqtt_components/camera.ts | 125 ---------------- futurehome/src/ha/mqtt_components/climate.ts | 50 ------- futurehome/src/ha/mqtt_components/cover.ts | 138 ------------------ .../ha/mqtt_components/device_automation.ts | 67 --------- .../src/ha/mqtt_components/device_tracker.ts | 119 +-------------- futurehome/src/ha/mqtt_components/event.ts | 123 ---------------- futurehome/src/ha/mqtt_components/fan.ts | 125 ---------------- .../src/ha/mqtt_components/humidifier.ts | 123 ---------------- futurehome/src/ha/mqtt_components/image.ts | 51 ------- .../src/ha/mqtt_components/lawn_mower.ts | 126 ---------------- futurehome/src/ha/mqtt_components/light.ts | 123 ---------------- futurehome/src/ha/mqtt_components/lock.ts | 122 ---------------- futurehome/src/ha/mqtt_components/notify.ts | 126 ---------------- futurehome/src/ha/mqtt_components/number.ts | 122 ---------------- futurehome/src/ha/mqtt_components/scene.ts | 130 ----------------- futurehome/src/ha/mqtt_components/select.ts | 124 ---------------- futurehome/src/ha/mqtt_components/sensor.ts | 122 ---------------- futurehome/src/ha/mqtt_components/siren.ts | 107 -------------- futurehome/src/ha/mqtt_components/switch.ts | 123 ---------------- futurehome/src/ha/mqtt_components/tag.ts | 72 --------- futurehome/src/ha/mqtt_components/text.ts | 123 ---------------- futurehome/src/ha/mqtt_components/update.ts | 118 --------------- futurehome/src/ha/mqtt_components/vacuum.ts | 125 ---------------- futurehome/src/ha/mqtt_components/valve.ts | 125 ---------------- .../src/ha/mqtt_components/water_heater.ts | 122 ---------------- 29 files changed, 2 insertions(+), 3202 deletions(-) diff --git a/futurehome/config.yaml b/futurehome/config.yaml index c059269..4f4bf53 100644 --- a/futurehome/config.yaml +++ b/futurehome/config.yaml @@ -1,6 +1,6 @@ # https://developers.home-assistant.io/docs/add-ons/configuration#add-on-config name: Futurehome -version: "0.0.30" +version: "0.0.31" slug: futurehome description: Local Futurehome Smarthub integration url: "https://github.com/adrianjagielak/home-assistant-futurehome" diff --git a/futurehome/src/ha/mqtt_components/alarm_control_panel.ts b/futurehome/src/ha/mqtt_components/alarm_control_panel.ts index 136669a..fd49f5a 100644 --- a/futurehome/src/ha/mqtt_components/alarm_control_panel.ts +++ b/futurehome/src/ha/mqtt_components/alarm_control_panel.ts @@ -41,56 +41,6 @@ export interface AlarmControlPanelComponent { */ command_topic: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * If defined, specifies a code to enable or disable the alarm in the frontend. * Note that the code is validated locally and blocks sending MQTT messages to the remote device. @@ -126,79 +76,6 @@ export interface AlarmControlPanelComponent { */ command_template?: string; - /** - * Information about the device this alarm panel is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Flag which defines if the entity should be enabled when first added. * Default: true diff --git a/futurehome/src/ha/mqtt_components/binary_sensor.ts b/futurehome/src/ha/mqtt_components/binary_sensor.ts index 8575739..5a30a9b 100644 --- a/futurehome/src/ha/mqtt_components/binary_sensor.ts +++ b/futurehome/src/ha/mqtt_components/binary_sensor.ts @@ -137,58 +137,6 @@ export interface BinarySensorComponent { */ off_delay?: number; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. - * If `availability` is not defined, the binary sensor will always be considered `available` and its state will be `on`, `off` or `unknown`. - * If `availability` is defined, the binary sensor will be considered as `unavailable` by default and the sensor's initial state will be `unavailable`. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The string that represents the `online` state. * Default: "online" @@ -200,77 +148,4 @@ export interface BinarySensorComponent { * Default: "offline" */ payload_not_available?: string; - - /** - * Information about the device this binary sensor is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/device_registry_index/). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/button.ts b/futurehome/src/ha/mqtt_components/button.ts index 593df2d..a1a0cac 100644 --- a/futurehome/src/ha/mqtt_components/button.ts +++ b/futurehome/src/ha/mqtt_components/button.ts @@ -38,129 +38,6 @@ export interface ButtonComponent { */ payload_press?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * Information about the device this button is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * The [type/class](https://www.home-assistant.io/integrations/button/#device-class) of the button to set the icon in the frontend. * The `device_class` can be `null`. diff --git a/futurehome/src/ha/mqtt_components/camera.ts b/futurehome/src/ha/mqtt_components/camera.ts index 0f27375..69e99ac 100644 --- a/futurehome/src/ha/mqtt_components/camera.ts +++ b/futurehome/src/ha/mqtt_components/camera.ts @@ -27,131 +27,6 @@ export interface CameraComponent { */ topic: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - * - * See https://www.home-assistant.io/integrations/mqtt/#availability_mode - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * Information about the device this camera is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs that uniquely identify the device. - * For example a serial number. - */ - identifiers?: string[] | string; - - /** - * The manufacturer of the device. - */ - manufacturer?: string; - - /** - * The model of the device. - */ - model?: string; - - /** - * The model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Flag which defines if the entity should be enabled when first added. * Default: true diff --git a/futurehome/src/ha/mqtt_components/climate.ts b/futurehome/src/ha/mqtt_components/climate.ts index 3fe38c3..8a1da4b 100644 --- a/futurehome/src/ha/mqtt_components/climate.ts +++ b/futurehome/src/ha/mqtt_components/climate.ts @@ -33,56 +33,6 @@ export interface ClimateComponent { */ action_topic?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest". - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * A template with which the value received on `current_humidity_topic` will be rendered. */ diff --git a/futurehome/src/ha/mqtt_components/cover.ts b/futurehome/src/ha/mqtt_components/cover.ts index c74a126..98078af 100644 --- a/futurehome/src/ha/mqtt_components/cover.ts +++ b/futurehome/src/ha/mqtt_components/cover.ts @@ -20,149 +20,11 @@ export interface CoverComponent { */ unique_id: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - * - * Each item describes: - * - topic: An MQTT topic subscribed to receive availability (online/offline) updates. - * - payload_available: The payload that represents the available state. Default: "online" - * - payload_not_available: The payload that represents the unavailable state. Default: "offline" - * - value_template: Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. To determine the device's availability, - * the result of this template will be compared to `payload_available` and `payload_not_available`. - * - * See https://www.home-assistant.io/integrations/mqtt/ for more info on availability. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. To determine the device's availability, - * the result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: `all`, `any`, `latest`. - * Default: "latest" - * - * - "all": `payload_available` must be received on all configured availability topics before the entity is marked as online. - * - "any": `payload_available` must be received on at least one configured availability topic before the entity is marked as online. - * - "latest": The last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability. - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. To determine the device's availability, - * the result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The subscribed-to MQTT topic to receive birth and LWT messages from the MQTT cover device. - * If an `availability` topic is not defined, the cover availability state will always be `available`. - * If an `availability` topic is defined, the cover availability state will be `unavailable` by default. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The MQTT topic to publish commands to control the cover. */ command_topic?: string; - /** - * Information about the device this cover is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Sets the [class of the device](https://www.home-assistant.io/integrations/cover/#device_class), * changing the device state and icon that is displayed on the frontend. diff --git a/futurehome/src/ha/mqtt_components/device_automation.ts b/futurehome/src/ha/mqtt_components/device_automation.ts index 64784d2..65fa9e5 100644 --- a/futurehome/src/ha/mqtt_components/device_automation.ts +++ b/futurehome/src/ha/mqtt_components/device_automation.ts @@ -65,73 +65,6 @@ export interface DeviceAutomationComponent { */ subtype: string; - /** - * Information about the device this device trigger is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * At least one of identifiers or connections must be present to identify the device. - */ - device: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract the value. */ diff --git a/futurehome/src/ha/mqtt_components/device_tracker.ts b/futurehome/src/ha/mqtt_components/device_tracker.ts index 5b5dcce..da1a303 100644 --- a/futurehome/src/ha/mqtt_components/device_tracker.ts +++ b/futurehome/src/ha/mqtt_components/device_tracker.ts @@ -2,8 +2,7 @@ * Represents a MQTT Device Tracker component for Home Assistant MQTT Discovery. * * The `mqtt` device tracker platform allows tracking devices' presence and location - * through MQTT messages. It supports tracking using state topics and/or JSON attributes topics, - * with optional availability topics for device online/offline state reporting. + * through MQTT messages. * * For detailed documentation see: * https://www.home-assistant.io/integrations/device_tracker.mqtt/ @@ -113,122 +112,6 @@ export interface DeviceTrackerComponent { */ payload_not_available?: string; - /** - * The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. - * If `availability` is not defined, the device tracker will always be considered `available`. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest". - * - * When set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. - * When set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. - * When set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability. - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Information about the device this device tracker is a part of that ties it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * [Icon](https://www.home-assistant.io/docs/configuration/customizing-devices/#icon) for the entity. */ diff --git a/futurehome/src/ha/mqtt_components/event.ts b/futurehome/src/ha/mqtt_components/event.ts index 47433c9..98d7f8a 100644 --- a/futurehome/src/ha/mqtt_components/event.ts +++ b/futurehome/src/ha/mqtt_components/event.ts @@ -36,129 +36,6 @@ export interface EventComponent { */ event_types: string[]; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * Information about the device this event is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/core/device_registry_index/). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * The [type/class](https://www.home-assistant.io/integrations/event/#device-class) of the event to set the icon in the frontend. * The `device_class` can be `null`. diff --git a/futurehome/src/ha/mqtt_components/fan.ts b/futurehome/src/ha/mqtt_components/fan.ts index ba5023b..75434eb 100644 --- a/futurehome/src/ha/mqtt_components/fan.ts +++ b/futurehome/src/ha/mqtt_components/fan.ts @@ -211,58 +211,6 @@ export interface FanComponent { */ json_attributes_topic?: string; - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive birth and LWT messages from the MQTT device. - * If `availability` is not defined, the fan will always be considered `available` and its state will be as per the last command/state. - * If `availability` is defined, the fan will be considered as `unavailable` by default. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The payload that represents the available state. * Default: "online" @@ -324,77 +272,4 @@ export interface FanComponent { * Default: 1 */ speed_range_min?: number; - - /** - * Information about the device this fan is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/humidifier.ts b/futurehome/src/ha/mqtt_components/humidifier.ts index d912674..c73e8bf 100644 --- a/futurehome/src/ha/mqtt_components/humidifier.ts +++ b/futurehome/src/ha/mqtt_components/humidifier.ts @@ -166,56 +166,6 @@ export interface HumidifierComponent { */ min_humidity?: number; - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - /** * The string that represents the `online` state. * Default: `"online"` @@ -292,77 +242,4 @@ export interface HumidifierComponent { * Default: true */ retain?: boolean; - - /** - * Information about the device this humidifier is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/image.ts b/futurehome/src/ha/mqtt_components/image.ts index 2c21b75..d89c4ef 100644 --- a/futurehome/src/ha/mqtt_components/image.ts +++ b/futurehome/src/ha/mqtt_components/image.ts @@ -70,57 +70,6 @@ export interface ImageComponent { */ encoding?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest" - * See https://www.home-assistant.io/integrations/mqtt/#device-discovery-payload - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * Flag which defines if the entity should be enabled when first added. * Default: true diff --git a/futurehome/src/ha/mqtt_components/lawn_mower.ts b/futurehome/src/ha/mqtt_components/lawn_mower.ts index a724520..192729a 100644 --- a/futurehome/src/ha/mqtt_components/lawn_mower.ts +++ b/futurehome/src/ha/mqtt_components/lawn_mower.ts @@ -33,132 +33,6 @@ export interface LawnMowerComponent { */ activity_value_template?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract the device's availability from the `topic`. - * To determine the device's availability, the result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid entries are `all`, `any`, and `latest`. - * If set to `all`, `payload_available` must be received on all configured availability topics before the entity is marked as online. - * If set to `any`, `payload_available` must be received on at least one configured availability topic before the entity is marked as online. - * If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability. - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, the result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * Information about the device this lawn mower is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when the [`unique_id`](#unique_id) is set. - * At least one of the identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://`, or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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 the device topology in Home Assistant. - */ - via_device?: string; - }; - /** * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-command-templates-with-mqtt) * to generate the payload to send to `dock_command_topic`. diff --git a/futurehome/src/ha/mqtt_components/light.ts b/futurehome/src/ha/mqtt_components/light.ts index cbaf9f9..f1e59e8 100644 --- a/futurehome/src/ha/mqtt_components/light.ts +++ b/futurehome/src/ha/mqtt_components/light.ts @@ -21,56 +21,6 @@ export interface LightComponent { */ unique_id?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * Flag that defines if light supports brightness when the `rgb`, `rgbw`, or `rgbww` color mode is supported. * Only for JSON schema. @@ -460,79 +410,6 @@ export interface LightComponent { */ payload_on?: string; - /** - * Information about the device this light is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/device_registry_index/). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * The schema to use. * Must be one of `basic` (default), `json`, or `template`. diff --git a/futurehome/src/ha/mqtt_components/lock.ts b/futurehome/src/ha/mqtt_components/lock.ts index 02440e3..56e47b4 100644 --- a/futurehome/src/ha/mqtt_components/lock.ts +++ b/futurehome/src/ha/mqtt_components/lock.ts @@ -33,56 +33,6 @@ export interface LockComponent { */ state_topic?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * A regular expression to validate a supplied code when it is set during the action to `open`, `lock` or `unlock` the MQTT lock. */ @@ -97,78 +47,6 @@ export interface LockComponent { */ command_template?: string; - /** - * Information about the device this lock is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs that uniquely identify the device. - * For example a serial number. - */ - identifiers?: string[] | string; - - /** - * The manufacturer of the device. - */ - manufacturer?: string; - - /** - * The model of the device. - */ - model?: string; - - /** - * The model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Flag which defines if the entity should be enabled when first added. * Default: true diff --git a/futurehome/src/ha/mqtt_components/notify.ts b/futurehome/src/ha/mqtt_components/notify.ts index d514ed4..474fd24 100644 --- a/futurehome/src/ha/mqtt_components/notify.ts +++ b/futurehome/src/ha/mqtt_components/notify.ts @@ -33,59 +33,6 @@ export interface NotifyComponent { */ command_template?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * If set to "all", `payload_available` must be received on all configured availability topics before the entity is marked as online. - * If set to "any", `payload_available` must be received on at least one configured availability topic before the entity is marked as online. - * If set to "latest", the last `payload_available` or `payload_not_available` received on any configured availability topic controls the availability. - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The encoding of the published messages. * Default: "utf-8" @@ -161,77 +108,4 @@ export interface NotifyComponent { * Default: "offline" */ payload_not_available?: string; - - /** - * Information about the device this notify entity is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/number.ts b/futurehome/src/ha/mqtt_components/number.ts index ca56b39..08d3792 100644 --- a/futurehome/src/ha/mqtt_components/number.ts +++ b/futurehome/src/ha/mqtt_components/number.ts @@ -153,126 +153,4 @@ export interface NumberComponent { * Used instead of `name` for automatic generation of `entity_id`. */ object_id?: string; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * Information about the device this Number is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/scene.ts b/futurehome/src/ha/mqtt_components/scene.ts index cb3c247..79c763d 100644 --- a/futurehome/src/ha/mqtt_components/scene.ts +++ b/futurehome/src/ha/mqtt_components/scene.ts @@ -30,63 +30,6 @@ export interface SceneComponent { */ payload_on?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - * - * If set to `all`, `payload_available` must be received on all configured availability topics before - * the entity is marked as online. - * If set to `any`, `payload_available` must be received on at least one configured availability topic before - * the entity is marked as online. - * If set to `latest`, the last `payload_available` or `payload_not_available` received on any configured availability topic - * controls the availability. - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The payload that represents the available state. * Default: "online" @@ -99,79 +42,6 @@ export interface SceneComponent { */ payload_not_available?: string; - /** - * Information about the device this scene is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://` or `https://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs that uniquely identify the device. - * For example a serial number. - */ - identifiers?: string[] | string; - - /** - * The manufacturer of the device. - */ - manufacturer?: string; - - /** - * The model of the device. - */ - model?: string; - - /** - * The model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Flag which defines if the entity should be enabled when first added. * Default: true diff --git a/futurehome/src/ha/mqtt_components/select.ts b/futurehome/src/ha/mqtt_components/select.ts index 73252b6..9cd7cb8 100644 --- a/futurehome/src/ha/mqtt_components/select.ts +++ b/futurehome/src/ha/mqtt_components/select.ts @@ -118,128 +118,4 @@ export interface SelectComponent { * Used instead of `name` for automatic generation of `entity_id`. */ object_id?: string; - - /** - * Information about the device this Select is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * If `availability` is not defined, the select will always be considered `available`. - * Must not be used together with `availability`. - */ - availability_topic?: string; } diff --git a/futurehome/src/ha/mqtt_components/sensor.ts b/futurehome/src/ha/mqtt_components/sensor.ts index 69fc91b..b22f352 100644 --- a/futurehome/src/ha/mqtt_components/sensor.ts +++ b/futurehome/src/ha/mqtt_components/sensor.ts @@ -149,55 +149,6 @@ export interface SensorComponent { */ last_reset_value_template?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * If `availability` is not defined, the sensor will always be considered `available`. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The payload that represents the available state. * Default: "online" @@ -209,77 +160,4 @@ export interface SensorComponent { * Default: "offline" */ payload_not_available?: string; - - /** - * Information about the device this sensor is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/device_registry_index/). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/siren.ts b/futurehome/src/ha/mqtt_components/siren.ts index 227292d..6caf08b 100644 --- a/futurehome/src/ha/mqtt_components/siren.ts +++ b/futurehome/src/ha/mqtt_components/siren.ts @@ -39,71 +39,6 @@ export interface SirenComponent { */ command_topic?: string; - /** - * Information about the device this siren is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/core/device_registry_index/). Only works when [`unique_id`](#unique_id) is set. At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs that uniquely identify the device. For example a serial number. - */ - identifiers?: string[] | string; - - /** - * The manufacturer of the device. - */ - manufacturer?: string; - - /** - * The model of the device. - */ - model?: string; - - /** - * The model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * Flag which defines if the entity should be enabled when first added. * Default: true @@ -227,46 +162,4 @@ export interface SirenComponent { * Default: true */ support_volume_set?: boolean; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract device's availability from the `topic`. To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. Valid values: "all", "any", "latest". Default: "latest". - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) to extract device's availability from the `availability_topic`. To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. Must not be used together with `availability`. - */ - availability_topic?: string; } diff --git a/futurehome/src/ha/mqtt_components/switch.ts b/futurehome/src/ha/mqtt_components/switch.ts index 509eee4..f39f911 100644 --- a/futurehome/src/ha/mqtt_components/switch.ts +++ b/futurehome/src/ha/mqtt_components/switch.ts @@ -162,127 +162,4 @@ export interface SwitchComponent { * To determine the switch's state, the result of this template will be compared to `state_on` and `state_off`. */ value_template?: string; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - - /** - * Information about the device this switch is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/tag.ts b/futurehome/src/ha/mqtt_components/tag.ts index e855558..bc126fd 100644 --- a/futurehome/src/ha/mqtt_components/tag.ts +++ b/futurehome/src/ha/mqtt_components/tag.ts @@ -29,76 +29,4 @@ export interface TagComponent { * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) that returns a tag ID. */ value_template?: string; - - /** - * Information about the device this device trigger is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * At least one of identifiers or connections must be present to identify the device. - */ - device: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/text.ts b/futurehome/src/ha/mqtt_components/text.ts index caebcc4..b22f1af 100644 --- a/futurehome/src/ha/mqtt_components/text.ts +++ b/futurehome/src/ha/mqtt_components/text.ts @@ -116,56 +116,6 @@ export interface TextComponent { */ json_attributes_topic?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The string that represents the `online` state. * Default: "online" @@ -189,77 +139,4 @@ export interface TextComponent { * Default: false */ retain?: boolean; - - /** - * Information about the device this of text capability is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/update.ts b/futurehome/src/ha/mqtt_components/update.ts index 886ffc1..4152ff7 100644 --- a/futurehome/src/ha/mqtt_components/update.ts +++ b/futurehome/src/ha/mqtt_components/update.ts @@ -145,55 +145,6 @@ export interface UpdateComponent { */ qos?: number; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. Result compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * Result compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The string that represents the `online` state. * Default: "online" @@ -205,73 +156,4 @@ export interface UpdateComponent { * Default: "offline" */ payload_not_available?: string; - - /** - * Information about the device this Update is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when `unique_id` is set. At least one of identifiers or connections must be present. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be `http://`, `https://` or an internal `homeassistant://` URL. - */ - configuration_url?: string; - - /** - * A list of connections of the device to the outside world as a list of tuples `[connection_type, connection_identifier]`. - * Example: `[["mac", "02:5b:26:a8:dc:12"]]`. - */ - connections?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs that uniquely identify the device. For example a serial number. - */ - identifiers?: string[] | string; - - /** - * The manufacturer of the device. - */ - manufacturer?: string; - - /** - * The model of the device. - */ - model?: string; - - /** - * The model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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: hubs, or parent devices of a sub-device. - */ - via_device?: string; - }; } diff --git a/futurehome/src/ha/mqtt_components/vacuum.ts b/futurehome/src/ha/mqtt_components/vacuum.ts index 1c5b25d..2009fbe 100644 --- a/futurehome/src/ha/mqtt_components/vacuum.ts +++ b/futurehome/src/ha/mqtt_components/vacuum.ts @@ -20,137 +20,12 @@ export interface VacuumComponent { * Required when used with device-based discovery. */ unique_id?: string; - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest". - * Default: "latest" - * - * See also: - * https://www.home-assistant.io/integrations/mqtt/#device-discovery-payload - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; /** * The MQTT topic to publish commands to control the vacuum. */ command_topic?: string; - /** - * Information about the device this vacuum is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/core/device_registry_index/). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - /** * The encoding of the payloads received and published messages. * Set to `""` to disable decoding of incoming payload. diff --git a/futurehome/src/ha/mqtt_components/valve.ts b/futurehome/src/ha/mqtt_components/valve.ts index 89f5fb5..b846713 100644 --- a/futurehome/src/ha/mqtt_components/valve.ts +++ b/futurehome/src/ha/mqtt_components/valve.ts @@ -145,58 +145,6 @@ export interface ValveComponent { */ json_attributes_template?: string; - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract the device's availability from the `topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template will be compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive birth and LWT messages from the MQTT valve device. - * If an `availability` topic is not defined, the valve availability state will always be `available`. - * If an `availability` topic is defined, the valve availability state will be `unavailable` by default. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The payload that represents the online state. * Default: "online" @@ -267,77 +215,4 @@ export interface ValveComponent { * The `device_class` can be `null`. */ device_class?: string | null; - - /** - * Information about the device this valve is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; } diff --git a/futurehome/src/ha/mqtt_components/water_heater.ts b/futurehome/src/ha/mqtt_components/water_heater.ts index 50b3276..b8f6280 100644 --- a/futurehome/src/ha/mqtt_components/water_heater.ts +++ b/futurehome/src/ha/mqtt_components/water_heater.ts @@ -60,128 +60,6 @@ export interface WaterHeaterComponent { */ icon?: string; - /** - * Information about the device this water heater device is a part of to tie it into the [device registry](https://developers.home-assistant.io/docs/en/device_registry_index.html). - * Only works through [MQTT discovery](https://www.home-assistant.io/integrations/mqtt/#mqtt-discovery) and when [`unique_id`](#unique_id) is set. - * At least one of identifiers or connections must be present to identify the device. - */ - device?: { - /** - * A link to the webpage that can manage the configuration of this device. - * Can be either an `http://`, `https://` or an internal `homeassistant://` 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?: Array<[string, string]>; - - /** - * The hardware version of the device. - */ - hw_version?: string; - - /** - * A list of IDs 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 model identifier of the device. - */ - model_id?: string; - - /** - * The name of the device. - */ - name?: string; - - /** - * The serial number of the device. - */ - serial_number?: string; - - /** - * Suggest an area if the device isn’t in 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; - }; - - /** - * A list of MQTT topics subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability_topic`. - */ - availability?: Array<{ - /** - * An MQTT topic subscribed to receive availability (online/offline) updates. - */ - topic: string; - - /** - * The payload that represents the available state. - * Default: "online" - */ - payload_available?: string; - - /** - * The payload that represents the unavailable state. - * Default: "offline" - */ - payload_not_available?: string; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `topic`. - * To determine the device's availability, result of this template is compared to `payload_available` and `payload_not_available`. - */ - value_template?: string; - }>; - - /** - * When `availability` is configured, this controls the conditions needed to set the entity to `available`. - * Valid values: "all", "any", "latest" - * Default: "latest" - */ - availability_mode?: 'all' | 'any' | 'latest'; - - /** - * Defines a [template](https://www.home-assistant.io/docs/configuration/templating/#using-value-templates-with-mqtt) - * to extract device's availability from the `availability_topic`. - * To determine the device's availability, result of this template is compared to `payload_available` and `payload_not_available`. - */ - availability_template?: string; - - /** - * The MQTT topic subscribed to receive availability (online/offline) updates. - * Must not be used together with `availability`. - */ - availability_topic?: string; - /** * The payload that represents the available state. * Default: "online"