From 464231a9de4b73c1eb6188d20f0419fabc9439c2 Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Thu, 3 Jun 2021 09:43:00 +0200 Subject: [PATCH] Document MQTT enabled_by_default (#18069) --- .../alarm_control_panel.mqtt.markdown | 5 +++++ .../_integrations/binary_sensor.mqtt.markdown | 5 +++++ source/_integrations/camera.mqtt.markdown | 5 +++++ source/_integrations/climate.mqtt.markdown | 5 +++++ source/_integrations/cover.mqtt.markdown | 5 +++++ source/_integrations/fan.mqtt.markdown | 5 +++++ source/_integrations/light.mqtt.markdown | 15 +++++++++++++ source/_integrations/lock.mqtt.markdown | 5 +++++ source/_integrations/number.mqtt.markdown | 5 +++++ source/_integrations/scene.mqtt.markdown | 21 ++++++++++++------- source/_integrations/sensor.mqtt.markdown | 5 +++++ source/_integrations/switch.mqtt.markdown | 5 +++++ source/_integrations/vacuum.mqtt.markdown | 5 +++++ 13 files changed, 83 insertions(+), 8 deletions(-) diff --git a/source/_integrations/alarm_control_panel.mqtt.markdown b/source/_integrations/alarm_control_panel.mqtt.markdown index a543b9baa2e..5a79a75c638 100644 --- a/source/_integrations/alarm_control_panel.mqtt.markdown +++ b/source/_integrations/alarm_control_panel.mqtt.markdown @@ -125,6 +125,11 @@ device: description: "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." required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/binary_sensor.mqtt.markdown b/source/_integrations/binary_sensor.mqtt.markdown index 3c3f1dffb70..edd2575a06e 100644 --- a/source/_integrations/binary_sensor.mqtt.markdown +++ b/source/_integrations/binary_sensor.mqtt.markdown @@ -100,6 +100,11 @@ device_class: description: Sets the [class of the device](/integrations/binary_sensor/#device-class), changing the device state and icon that is displayed on the frontend. required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true expire_after: description: Defines the number of seconds after the sensor's state expires, if it's not updated. After expiry, the sensor's state becomes `unavailable`. required: false diff --git a/source/_integrations/camera.mqtt.markdown b/source/_integrations/camera.mqtt.markdown index 00304a9a52b..e4fc88be5f7 100644 --- a/source/_integrations/camera.mqtt.markdown +++ b/source/_integrations/camera.mqtt.markdown @@ -89,6 +89,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/climate.mqtt.markdown b/source/_integrations/climate.mqtt.markdown index a3bd1b3ff90..2c4d803957c 100644 --- a/source/_integrations/climate.mqtt.markdown +++ b/source/_integrations/climate.mqtt.markdown @@ -128,6 +128,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true fan_mode_command_template: description: A template to render the value sent to the `fan_mode_command_topic` with. required: false diff --git a/source/_integrations/cover.mqtt.markdown b/source/_integrations/cover.mqtt.markdown index 2e8410b4a42..a735951c0d9 100644 --- a/source/_integrations/cover.mqtt.markdown +++ b/source/_integrations/cover.mqtt.markdown @@ -110,6 +110,11 @@ device_class: description: Sets the [class of the device](/integrations/cover/), changing the device state and icon that is displayed on the frontend. required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/fan.mqtt.markdown b/source/_integrations/fan.mqtt.markdown index 167ce449a6d..df7a66d1c13 100644 --- a/source/_integrations/fan.mqtt.markdown +++ b/source/_integrations/fan.mqtt.markdown @@ -101,6 +101,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/light.mqtt.markdown b/source/_integrations/light.mqtt.markdown index 54cbad670df..ccbe1b1d7f1 100644 --- a/source/_integrations/light.mqtt.markdown +++ b/source/_integrations/light.mqtt.markdown @@ -151,6 +151,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true effect_command_topic: description: "The MQTT topic to publish commands to change the light's effect state." required: false @@ -516,6 +521,11 @@ device: description: 'The firmware version of the device.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true effect: description: Flag that defines if the light supports effects. required: false @@ -849,6 +859,11 @@ device: description: 'The firmware version of the device.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true effect_list: description: List of possible effects. required: false diff --git a/source/_integrations/lock.mqtt.markdown b/source/_integrations/lock.mqtt.markdown index 3dc3bfae24b..f9aa691b6ee 100644 --- a/source/_integrations/lock.mqtt.markdown +++ b/source/_integrations/lock.mqtt.markdown @@ -97,6 +97,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/number.mqtt.markdown b/source/_integrations/number.mqtt.markdown index 9264a5720ef..d2da4c14d4e 100644 --- a/source/_integrations/number.mqtt.markdown +++ b/source/_integrations/number.mqtt.markdown @@ -87,6 +87,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/scene.mqtt.markdown b/source/_integrations/scene.mqtt.markdown index 9525f24fc91..0b1428a22bf 100644 --- a/source/_integrations/scene.mqtt.markdown +++ b/source/_integrations/scene.mqtt.markdown @@ -51,18 +51,23 @@ availability_topic: required: false type: string command_topic: - description: The MQTT topic to publish commands to change the switch state. + description: The MQTT topic to publish commands to change the scene state. required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: - description: Icon for the switch. + description: Icon for the scene. required: false type: icon name: - description: The name to use when displaying this switch. + description: The name to use when displaying this scene. required: false type: string - default: MQTT Switch + default: MQTT Scene payload_available: description: The payload that represents the available state. required: false @@ -89,7 +94,7 @@ retain: type: boolean default: false unique_id: - description: An ID that uniquely identifies this switch device. If two switches have the same unique ID, Home Assistant will raise an exception. + description: An ID that uniquely identifies this scene entity. If two scenes have the same unique ID, Home Assistant will raise an exception. required: false type: string {% endconfiguration %} @@ -102,15 +107,15 @@ Make sure that your topic matches exactly. `some-topic/` and `some-topic` are di ## Examples -In this section, you will find some real-life examples of how to use this sensor. +In this section, you will find some real-life examples of how to use the MQTT Scene. ### Full configuration -The example below shows a full configuration for a switch. +The example below shows a full configuration for a scene. ```yaml # Example configuration.yaml entry -switch: +scene: - platform: mqtt unique_id: living_room_party_scene name: "Living Room Party Scene" diff --git a/source/_integrations/sensor.mqtt.markdown b/source/_integrations/sensor.mqtt.markdown index 82055159f79..be0ba3801af 100644 --- a/source/_integrations/sensor.mqtt.markdown +++ b/source/_integrations/sensor.mqtt.markdown @@ -92,6 +92,11 @@ device_class: required: false type: device_class default: None +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true expire_after: description: Defines the number of seconds after the sensor's state expires, if it's not updated. After expiry, the sensor's state becomes `unavailable`. required: false diff --git a/source/_integrations/switch.mqtt.markdown b/source/_integrations/switch.mqtt.markdown index 1447bc93eff..291a96b9b76 100644 --- a/source/_integrations/switch.mqtt.markdown +++ b/source/_integrations/switch.mqtt.markdown @@ -97,6 +97,11 @@ device: description: '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.' required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true icon: description: "[Icon](/docs/configuration/customizing-devices/#icon) for the entity." required: false diff --git a/source/_integrations/vacuum.mqtt.markdown b/source/_integrations/vacuum.mqtt.markdown index 4e7838ec4be..acde6dd6814 100644 --- a/source/_integrations/vacuum.mqtt.markdown +++ b/source/_integrations/vacuum.mqtt.markdown @@ -93,6 +93,11 @@ docked_topic: description: The MQTT topic subscribed to receive docked state values from the vacuum. required: false type: string +enabled_by_default: + description: Flag which defines if the entity should be enabled when first added. + required: false + type: boolean + default: true error_template: description: Defines a [template](/topics/templating/) to define potential error messages emitted by the vacuum. This is required if `error_topic` is set. required: false