From f01798fede521bcf0f276530a03bb1e4eb8737eb Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 14 Aug 2024 14:48:47 +1200 Subject: [PATCH] [fan] Tidy up name/id (#4144) --- components/fan/binary.rst | 3 --- components/fan/hbridge.rst | 2 -- components/fan/index.rst | 3 ++- components/fan/speed.rst | 2 -- components/fan/template.rst | 2 -- components/fan/tuya.rst | 2 -- 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/components/fan/binary.rst b/components/fan/binary.rst index c7328c5e7..69414e351 100644 --- a/components/fan/binary.rst +++ b/components/fan/binary.rst @@ -27,13 +27,10 @@ Configuration variables: - **output** (**Required**, :ref:`config-id`): The id of the binary output component to use for this fan. -- **name** (**Required**, string): The name for this fan. - **oscillation_output** (*Optional*, :ref:`config-id`): The id of the :ref:`output ` to use for the oscillation state of this fan. Default is empty. - **direction_output** (*Optional*, :ref:`config-id`): The id of the :ref:`output ` to use for the direction state of the fan. Default is empty. -- **id** (*Optional*, :ref:`config-id`): Manually specify - the ID used for code generation. - All other options from :ref:`Fan Component `. See Also diff --git a/components/fan/hbridge.rst b/components/fan/hbridge.rst index 7e4295f8c..120fcb173 100644 --- a/components/fan/hbridge.rst +++ b/components/fan/hbridge.rst @@ -46,8 +46,6 @@ Configuration variables: - **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. The value is used to calculate the percentages for each speed. E.g. ``2`` means that you have 50% and 100% while ``100`` will allow 1% increments in the output. Defaults to ``100``. -- **name** (**Required**, string): The name for this fan. -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **preset_modes** (*Optional*): A list of preset modes for this fan. Preset modes can be used in automations (i.e. `on_preset_set`). - All other options from :ref:`Fan Component `. diff --git a/components/fan/index.rst b/components/fan/index.rst index 9e68a0d17..c0e34ef05 100644 --- a/components/fan/index.rst +++ b/components/fan/index.rst @@ -26,7 +26,8 @@ Base Fan Configuration Configuration variables: -- **name** (**Required**, string): The name of the fan. +- **id** (*Optional*, string): Manually specify the ID for code generation. At least one of **id** and **name** must be specified. +- **name** (*Optional*, string): The name of the fan. At least one of **id** and **name** must be specified. .. note:: diff --git a/components/fan/speed.rst b/components/fan/speed.rst index e23f0b009..28af893b8 100644 --- a/components/fan/speed.rst +++ b/components/fan/speed.rst @@ -23,7 +23,6 @@ supports speed settings. Configuration variables: ------------------------ -- **name** (*Optional*, string): The name for this fan. - **output** (**Required**, :ref:`config-id`): The id of the :ref:`float output ` to use for this fan. - **oscillation_output** (*Optional*, :ref:`config-id`): The id of the :ref:`output ` to use for the oscillation state of this fan. Default is empty. @@ -32,7 +31,6 @@ Configuration variables: - **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. The value is used to calculate the percentages for each speed. E.g. ``2`` means that you have 50% and 100% while ``100`` will allow 1% increments in the output. Defaults to ``100``. -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. - **preset_modes** (*Optional*): A list of preset modes for this fan. Preset modes can be used in automations (i.e. `on_preset_set`). - All other options from :ref:`Fan Component `. diff --git a/components/fan/template.rst b/components/fan/template.rst index 75c36ce8e..19a9e04a5 100644 --- a/components/fan/template.rst +++ b/components/fan/template.rst @@ -25,8 +25,6 @@ The ``template`` fan platform lets you create a fan interface using only trigger Configuration variables: ------------------------ -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. -- **name** (*Optional*, string): The name for this fan. - **has_direction** (*Optional*, boolean): Indicates if there should be a control for direction. Default is ``false``. - **has_oscillating** (*Optional*, boolean): Indicates if there should be a control for oscillating. Default is ``false``. - **speed_count** (*Optional*, int): Set the number of supported discrete speed levels. Default is only on/off. diff --git a/components/fan/tuya.rst b/components/fan/tuya.rst index 8eb3136f4..7bfe09cbc 100644 --- a/components/fan/tuya.rst +++ b/components/fan/tuya.rst @@ -49,8 +49,6 @@ Based on this, you can create the fan as follows: Configuration variables: ------------------------ -- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation. -- **name** (**Required**, string): The name of the fan. - **speed_datapoint** (**Required**, int): The datapoint id number of the fan speed. - **switch_datapoint** (**Required**, int): The datapoint id number of the fan switch. - **oscillation_datapoint** (*Optional*, int): The datapoint id number of the oscillation