From 5f0f79638792ae43119662883476b26acee2cf73 Mon Sep 17 00:00:00 2001 From: Paul Monigatti Date: Sun, 10 Oct 2021 21:39:50 +1300 Subject: [PATCH] Add 'icon' property to Binary Sensor, Climate, Cover, Fan, and Light platforms (#1489) * Added 'icon' field to lights * Icon property is not ignored (checked with HA 2021.9.7) if a device class is set * Added icon properties to binary sensor, climate, cover, and fan components --- components/binary_sensor/index.rst | 1 + components/climate/index.rst | 1 + components/cover/index.rst | 1 + components/fan/index.rst | 1 + components/light/index.rst | 1 + components/sensor/index.rst | 3 +-- 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/components/binary_sensor/index.rst b/components/binary_sensor/index.rst index 5e95e61de..3cf2a1802 100644 --- a/components/binary_sensor/index.rst +++ b/components/binary_sensor/index.rst @@ -30,6 +30,7 @@ Configuration variables: - **device_class** (*Optional*, string): The device class for the sensor. See https://www.home-assistant.io/components/binary_sensor/ for a list of available options. +- **icon** (*Optional*, icon): Manually set the icon to use for the binary sensor in the frontend. - **filters** (*Optional*, list): A list of filters to apply on the binary sensor values such as inverting signals. See :ref:`binary_sensor-filters`. diff --git a/components/climate/index.rst b/components/climate/index.rst index 5ca414ee6..74a0ec808 100644 --- a/components/climate/index.rst +++ b/components/climate/index.rst @@ -33,6 +33,7 @@ All climate platforms in ESPHome inherit from the climate configuration schema. Configuration variables: +- **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 frontend. diff --git a/components/cover/index.rst b/components/cover/index.rst index db72952e5..faab24e48 100644 --- a/components/cover/index.rst +++ b/components/cover/index.rst @@ -30,6 +30,7 @@ Configuration variables: - **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. Advanced options: diff --git a/components/fan/index.rst b/components/fan/index.rst index 9193eef00..67035f60b 100644 --- a/components/fan/index.rst +++ b/components/fan/index.rst @@ -29,6 +29,7 @@ Base Fan Configuration Configuration variables: - **name** (**Required**, string): The name of the fan. +- **icon** (*Optional*, icon): Manually set the icon to use for the fan 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 a ``name`` will implicitly set this to true. diff --git a/components/light/index.rst b/components/light/index.rst index 735e7064a..f092a2cf8 100644 --- a/components/light/index.rst +++ b/components/light/index.rst @@ -26,6 +26,7 @@ All light configuration schemas inherit these options. Configuration variables: +- **icon** (*Optional*, icon): Manually set the icon to use for the light in the frontend. - **effects** (*Optional*, list): A list of :ref:`light effects ` to use for this light. - **gamma_correct** (*Optional*, float): Apply a `gamma correction factor `__ to the light channels. diff --git a/components/sensor/index.rst b/components/sensor/index.rst index 8ed43c227..87cb466cf 100644 --- a/components/sensor/index.rst +++ b/components/sensor/index.rst @@ -48,8 +48,7 @@ Configuration variables: - **state_class** (*Optional*, string): The state class for the sensor. See https://developers.home-assistant.io/docs/core/entity/sensor/#available-state-classes for a list of available options. Set to ``""`` to remove the default state class of a sensor. -- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend. The icon set here - is ignored by Home Assistant, if a device class is already set. +- **icon** (*Optional*, icon): Manually set the icon to use for the sensor in the frontend. - **accuracy_decimals** (*Optional*, int): Manually set the accuracy of decimals to use when reporting values. - **filters** (*Optional*): Specify filters to use for some basic transforming of values. See :ref:`Sensor Filters ` for more information.