mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-02-28 03:41:57 +01:00
Add note for names to use friendly_name (#2774)
This commit is contained in:
parent
f9aa59fd33
commit
8fbb53e016
@ -27,6 +27,13 @@ you can always override it.
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the binary sensor.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the binary sensor to use that name, you can set ``name: None``.
|
||||
|
||||
- **device_class** (*Optional*, string): The device class for the
|
||||
sensor. See https://developers.home-assistant.io/docs/core/entity/binary-sensor/#available-device-classes
|
||||
for a list of available options.
|
||||
|
@ -41,6 +41,12 @@ All buttons in ESPHome have a name and an optional icon.
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the button.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the button to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the button in the frontend.
|
||||
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
|
||||
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
|
||||
|
@ -33,6 +33,13 @@ All climate platforms in ESPHome inherit from the climate configuration schema.
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name of the climate device.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the climate to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the climate device in the frontend.
|
||||
- **visual** (*Optional*): Visual settings for the climate device - these do not
|
||||
affect operation and are solely for controlling how the climate device shows up in the
|
||||
|
@ -28,6 +28,13 @@ All cover config schemas inherit from this schema - you can set these keys for c
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the cover.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the cover to use that name, you can set ``name: None``.
|
||||
|
||||
- **device_class** (*Optional*, string): The device class for the
|
||||
sensor. See https://www.home-assistant.io/components/cover/ for a list of available options.
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the cover in the frontend.
|
||||
|
@ -27,6 +27,12 @@ Base Fan Configuration
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name of the fan.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the fan to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the fan in the frontend.
|
||||
- **restore_mode** (*Optional*): Control how the fan attempts to restore state on boot.
|
||||
|
||||
|
@ -26,6 +26,13 @@ All light configuration schemas inherit these options.
|
||||
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name of the light.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the light to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the light in the frontend.
|
||||
- **effects** (*Optional*, list): A list of :ref:`light effects <light-effects>` to use for this light.
|
||||
- **gamma_correct** (*Optional*, float): Apply a `gamma correction
|
||||
|
@ -6,7 +6,7 @@ Lock Component
|
||||
:image: folder-open.svg
|
||||
|
||||
The ``lock`` domain includes all platforms that should function like a lock
|
||||
with lock/unlock actions.
|
||||
with lock/unlock actions.
|
||||
|
||||
.. note::
|
||||
|
||||
@ -26,6 +26,12 @@ Base Lock Configuration
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name of the lock.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the lock to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the
|
||||
lock in the frontend.
|
||||
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
|
||||
|
@ -26,6 +26,12 @@ Base Media Player Configuration
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name of the media player.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the media player to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the
|
||||
media player in the frontend.
|
||||
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
|
||||
|
@ -31,6 +31,12 @@ All numbers in ESPHome have a name and an optional icon.
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the number.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the number to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the number in the frontend.
|
||||
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
|
||||
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
|
||||
|
@ -31,6 +31,12 @@ All selects in ESPHome have a name and an optional icon.
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the select.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the select to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the select in the frontend.
|
||||
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
|
||||
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
|
||||
@ -334,8 +340,8 @@ advanced stuff (see the full API Reference for more info).
|
||||
if (id(my_select).has_index(index)) {
|
||||
ESP_LOGI("main", "Select has index offset %d", index);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Example
|
||||
-------
|
||||
|
||||
@ -347,13 +353,13 @@ Setting up three options and set component state to selected option value.
|
||||
- platform: template
|
||||
name: Mode
|
||||
id: mode
|
||||
options:
|
||||
options:
|
||||
- "Option1"
|
||||
- "Option2"
|
||||
- "Option3"
|
||||
initial_option: "OFF"
|
||||
optimistic: true
|
||||
set_action:
|
||||
set_action:
|
||||
- logger.log:
|
||||
format: "Chosen option: %s"
|
||||
args: ["x.c_str()"]
|
||||
|
@ -40,6 +40,12 @@ Configuration variables:
|
||||
|
||||
- **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 for the sensor. At least one of **id** and **name** must be specified.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the sensor to use that name, you can set ``name: None``.
|
||||
|
||||
- **unit_of_measurement** (*Optional*, string): Manually set the unit
|
||||
of measurement the sensor should advertise its values with. This does
|
||||
not actually do any maths (conversion between units).
|
||||
|
@ -23,6 +23,12 @@ Base Switch Configuration
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name of the switch.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the switch to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the
|
||||
sensor in the frontend.
|
||||
- **inverted** (*Optional*, boolean): Whether to invert the binary
|
||||
@ -43,7 +49,7 @@ Configuration variables:
|
||||
- ``RESTORE_INVERTED_DEFAULT_ON`` - Attempt to restore state inverted from the previous state and default to ON.
|
||||
- ``ALWAYS_OFF`` - Always initialize the switch as OFF on bootup.
|
||||
- ``ALWAYS_ON`` - Always initialize the switch as ON on bootup.
|
||||
- ``DISABLED`` - Does nothing and leaves it up to the downstream platform component to decide. For example, the component could read hardware and determine the state, or have a specific configuration option to regulate initial state.
|
||||
- ``DISABLED`` - Does nothing and leaves it up to the downstream platform component to decide. For example, the component could read hardware and determine the state, or have a specific configuration option to regulate initial state.
|
||||
|
||||
Unless a specific platform defines another default value, the default is ``RESTORE_DEFAULT_OFF``.
|
||||
|
||||
|
@ -25,6 +25,12 @@ Base Text Sensor Configuration
|
||||
Configuration variables:
|
||||
|
||||
- **name** (**Required**, string): The name for the sensor.
|
||||
|
||||
.. note::
|
||||
|
||||
If you have a :ref:`friendly_name <esphome-configuration_variables>` set for your device and
|
||||
you want the text sensor to use that name, you can set ``name: None``.
|
||||
|
||||
- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend.
|
||||
- **internal** (*Optional*, boolean): Mark this component as internal. Internal components will
|
||||
not be exposed to the frontend (like Home Assistant). Only specifying an ``id`` without
|
||||
@ -145,7 +151,7 @@ The arguments are a list of substitutions, each in the form ``TO_FIND -> REPLACE
|
||||
``map``
|
||||
*******
|
||||
|
||||
Lookup the current value of the text sensor in a list, and return the matching item if found.
|
||||
Lookup the current value of the text sensor in a list, and return the matching item if found.
|
||||
Does not change the value of the text sensor if the current value wasn't found.
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user