Sensor device class docs (#5219)

* Sensor device class docs

* Fix binary_sensor copy

* Fix headings

* Add icons screenshot

* Add Empty device_class

* Grammar

* Update customizing-devices.markdown

* Add periods
This commit is contained in:
Otto Winter 2018-05-01 22:25:45 +02:00 committed by Fabian Affolter
parent dcda30e25b
commit 76b908b033
5 changed files with 18 additions and 3 deletions

View File

@ -2,7 +2,7 @@ module Jekyll
class ConfigurationBlock < Liquid::Block class ConfigurationBlock < Liquid::Block
TYPE_LINKS = { TYPE_LINKS = {
'action' => '/docs/scripts/', 'action' => '/docs/scripts/',
'device_class' => '/components/%{component}/#device_class', 'device_class' => '/components/%{component}/#device-class',
'template' => '/docs/configuration/templating/', 'template' => '/docs/configuration/templating/',
} }

View File

@ -11,6 +11,8 @@ footer: true
Binary sensors gather information about the state of devices which have a "digital" return value (either 1 or 0). These can be switches, contacts, pins, etc. These sensors only have two states: **0/off/low/closed/false** and **1/on/high/open/true**. Knowing that there are only two states allows Home Assistant to represent these sensors in a better way in the frontend according to their functionality. Binary sensors gather information about the state of devices which have a "digital" return value (either 1 or 0). These can be switches, contacts, pins, etc. These sensors only have two states: **0/off/low/closed/false** and **1/on/high/open/true**. Knowing that there are only two states allows Home Assistant to represent these sensors in a better way in the frontend according to their functionality.
### {% linkable_title Device Class %}
The way these sensors are displayed in the frontend can be modified in the [customize section](/getting-started/customizing-devices/). The following device classes are supported for binary sensors: The way these sensors are displayed in the frontend can be modified in the [customize section](/getting-started/customizing-devices/). The following device classes are supported for binary sensors:
- **None**: Generic on/off. This is the default and doesn't need to be set. - **None**: Generic on/off. This is the default and doesn't need to be set.

View File

@ -9,8 +9,20 @@ sharing: true
footer: true footer: true
--- ---
Sensors are gathering information about states and conditions. Sensors are gathering information about states and conditions.
Home Assistant currently supports a wide range of sensors. They are able to display information which are provides by Home Assistant directly, are gathered from web services, and, of course, physical devices. Please check the sidebar for a full list of supported sensor platforms. Home Assistant currently supports a wide range of sensors. They are able to display information which are provides by Home Assistant directly, are gathered from web services, and, of course, physical devices. Please check the sidebar for a full list of supported sensor platforms.
### {% linkable_title Device Class %}
The way these sensors are displayed in the frontend can be modified in the [customize section](/docs/configuration/customizing-devices/). The following device classes are supported for sensors:
- **None**: Generic sensor. This is the default and doesn't need to be set.
- **battery**: Percentage of battery that is left.
- **humidity**: Percentage of humidity in the air.
- **temperature**: Temperature in °C or °F.
<p class='img'>
<img src='/images/screenshots/sensor_device_classes_icons.png' />
Example of various device class icons for sensors.
</p>

View File

@ -71,9 +71,10 @@ homeassistant:
### {% linkable_title Device Class %} ### {% linkable_title Device Class %}
Device class is currently supported by the following platforms: Device class is currently supported by the following components:
* [Binary Sensor](/components/binary_sensor/) * [Binary Sensor](/components/binary_sensor/)
* [Sensor](/components/sensor/)
* [Cover](/components/cover/) * [Cover](/components/cover/)
### {% linkable_title Reloading customize %} ### {% linkable_title Reloading customize %}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB