mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 16:27:19 +00:00
Add ADS Select documentation (#34714)
* Add ADS Select documentation * fix phrasing. Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com>
This commit is contained in:
parent
059b3eb1e3
commit
caf3e954a3
@ -34,8 +34,10 @@ There is currently support for the following device types within Home Assistant:
|
|||||||
- [Sensor](#sensor)
|
- [Sensor](#sensor)
|
||||||
- [Switch](#switch)
|
- [Switch](#switch)
|
||||||
- [Cover](#cover)
|
- [Cover](#cover)
|
||||||
|
- [Select](#select)
|
||||||
- [Valve](#valve)
|
- [Valve](#valve)
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
To enable ADS, add the following lines to your {% term "`configuration.yaml`" %} file.
|
To enable ADS, add the following lines to your {% term "`configuration.yaml`" %} file.
|
||||||
@ -63,6 +65,7 @@ ip_address:
|
|||||||
type: string
|
type: string
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
<!-- omit in toc -->
|
||||||
## Action
|
## Action
|
||||||
|
|
||||||
The ADS integration will register the `write_by_name` action allowing you to write a value to a variable on your ADS device.
|
The ADS integration will register the `write_by_name` action allowing you to write a value to a variable on your ADS device.
|
||||||
@ -257,6 +260,20 @@ device_class:
|
|||||||
type: device_class
|
type: device_class
|
||||||
{% endconfiguration %}
|
{% endconfiguration %}
|
||||||
|
|
||||||
|
## Select
|
||||||
|
|
||||||
|
The `ads` select entity accesses an ENUM (int) variable on the connected ADS device. The variable is identified by its name. You have to set up a corresponding ENUM in the TwinCAT PLC. It is recommended to use explicit values starting from `0`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
TYPE E_SampleA :
|
||||||
|
(
|
||||||
|
e1 := 0,
|
||||||
|
e2 := 1,
|
||||||
|
e3 := 2,
|
||||||
|
);
|
||||||
|
END_TYPE
|
||||||
|
```
|
||||||
|
|
||||||
## Valve
|
## Valve
|
||||||
|
|
||||||
The `ads` valve entity accesses a boolean variable on the connected ADS device. The variable is identified by its name.
|
The `ads` valve entity accesses a boolean variable on the connected ADS device. The variable is identified by its name.
|
||||||
@ -266,6 +283,16 @@ file:
|
|||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
# Example configuration.yaml entry
|
# Example configuration.yaml entry
|
||||||
|
select:
|
||||||
|
- platform: ads
|
||||||
|
adsvar: MAIN.eMyEnum
|
||||||
|
options:
|
||||||
|
- "Off"
|
||||||
|
- "Setup"
|
||||||
|
- "Automatic"
|
||||||
|
- "Manual"
|
||||||
|
- "Guest"
|
||||||
|
- "Error"
|
||||||
valve:
|
valve:
|
||||||
- platform: ads
|
- platform: ads
|
||||||
adsvar: MAIN.bValveControl
|
adsvar: MAIN.bValveControl
|
||||||
@ -276,6 +303,10 @@ adsvar:
|
|||||||
required: true
|
required: true
|
||||||
description: The name of the variable which you want to access on the ADS device.
|
description: The name of the variable which you want to access on the ADS device.
|
||||||
type: string
|
type: string
|
||||||
|
options:
|
||||||
|
required: true
|
||||||
|
description: The available options to select from.
|
||||||
|
type: string
|
||||||
name:
|
name:
|
||||||
required: false
|
required: false
|
||||||
description: An identifier for the valve in the frontend.
|
description: An identifier for the valve in the frontend.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user