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:
Adam Pasztor 2024-09-23 09:48:23 +02:00 committed by GitHub
parent 059b3eb1e3
commit caf3e954a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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.