Add docs for switch to device_id for LCN actions (#35600)

* Add docs for switch to device_id for LCN actions

* Fix nipick comments

* Remove addres_to_device_id action
This commit is contained in:
Andre Lengwenus 2024-12-20 18:34:57 +01:00 committed by GitHub
parent 8e6c94ea52
commit 4db3365a47
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -431,13 +431,15 @@ For an explanation of the attributes refer to the corresponding [events](#events
In order to directly interact with the LCN system, and invoke commands which are not covered by the implemented platforms, the following actions can be used. In order to directly interact with the LCN system, and invoke commands which are not covered by the implemented platforms, the following actions can be used.
Refer to the [Performing actions](/docs/scripts/service-calls) page for examples on how to use them. Refer to the [Performing actions](/docs/scripts/service-calls) page for examples on how to use them.
When actions are linked to a particular device, the device is identified by its `device_id`. This `device_id` is a unique identifier supplied by Home Assistant.
### Action: `output_abs` ### Action: `output_abs`
Set absolute brightness of output port in percent. Set absolute brightness of output port in percent.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | --------------------------------- | --------------------- | | ---------------------- | -------- | --------------------------------- | --------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `output` | No | Output port of module | [OUTPUT_PORT](#ports) | | `output` | No | Output port of module | [OUTPUT_PORT](#ports) |
| `brightness` | Yes | Absolute brightness in percent | 0..100 | | `brightness` | Yes | Absolute brightness in percent | 0..100 |
| `transition` | Yes | Transition (ramp) time in seconds | 0..486 | | `transition` | Yes | Transition (ramp) time in seconds | 0..486 |
@ -447,7 +449,7 @@ Example:
```yaml ```yaml
action: lcn.output_abs action: lcn.output_abs
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
output: output1 output: output1
brightness: 100 brightness: 100
transition: 0 transition: 0
@ -459,7 +461,7 @@ Set relative brightness of output port in percent.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | --------------------------------- | --------------------- | | ---------------------- | -------- | --------------------------------- | --------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `output` | No | Output port of module | [OUTPUT_PORT](#ports) | | `output` | No | Output port of module | [OUTPUT_PORT](#ports) |
| `brightness` | Yes | Relative brightness in percent | -100..100 | | `brightness` | Yes | Relative brightness in percent | -100..100 |
| `transition` | Yes | Transition (ramp) time in seconds | 0..486 | | `transition` | Yes | Transition (ramp) time in seconds | 0..486 |
@ -469,7 +471,7 @@ Example:
```yaml ```yaml
action: lcn.output_rel action: lcn.output_rel
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
output: output1 output: output1
brightness: 30 brightness: 30
``` ```
@ -480,7 +482,7 @@ Toggle output port.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | --------------------------------- | --------------------- | | ---------------------- | -------- | --------------------------------- | --------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `output` | No | Output port of module | [OUTPUT_PORT](#ports) | | `output` | No | Output port of module | [OUTPUT_PORT](#ports) |
| `transition` | Yes | Transition (ramp) time in seconds | 0..486 | | `transition` | Yes | Transition (ramp) time in seconds | 0..486 |
@ -489,7 +491,7 @@ Example:
```yaml ```yaml
action: lcn.output_toggle action: lcn.output_toggle
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
output: output1 output: output1
transition: 0 transition: 0
``` ```
@ -503,15 +505,15 @@ Example states: `t---001-`
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | ------ | | ---------------------- | -------- | ----------------------------- | ------ |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `state` | No | Relay states as string | | `state` | No | Relay states as string ||
Example: Example:
```yaml ```yaml
action: lcn.relays action: lcn.relays
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
state: t---001- state: t---001-
``` ```
@ -521,7 +523,7 @@ Set the LED status.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | -------------------- | | ---------------------- | -------- | ----------------------------- | -------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `state` | No | LED state as string | [LED_STATE](#states) | | `state` | No | LED state as string | [LED_STATE](#states) |
Example: Example:
@ -529,7 +531,7 @@ Example:
```yaml ```yaml
action: lcn.led action: lcn.led
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
led: led6 led: led6
state: blink state: blink
``` ```
@ -542,7 +544,7 @@ If `unit_of_measurement` is not defined, it is assumed to be `native`.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | ------------------------------------------------------------------ | | ---------------------- | -------- | ----------------------------- | ------------------------------------------------------------------ |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `variable` | No | Variable name | [VARIABLE](#variables-and-units), [SETPOINT](#variables-and-units) | | `variable` | No | Variable name | [VARIABLE](#variables-and-units), [SETPOINT](#variables-and-units) |
| `value` | Yes | Variable value | _any positive number_ | | `value` | Yes | Variable value | _any positive number_ |
| `unit_of_measurement` | Yes | Variable unit | [VAR_UNIT](#variables-and-units) | | `unit_of_measurement` | Yes | Variable unit | [VAR_UNIT](#variables-and-units) |
@ -552,7 +554,7 @@ Example:
```yaml ```yaml
action: lcn.var_abs action: lcn.var_abs
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
variable: var1 variable: var1
value: 75 value: 75
unit_of_measurement: % unit_of_measurement: %
@ -571,7 +573,7 @@ If `unit_of_measurement` is not defined, it is assumed to be `native`.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | ----------------------------------------------------------------------------------------------------- | | ---------------------- | -------- | ----------------------------- | ----------------------------------------------------------------------------------------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `variable` | No | Variable name | [VARIABLE](#variables-and-units), [SETPOINT](#variables-and-units), [THRESHOLD](#variables-and-units) | | `variable` | No | Variable name | [VARIABLE](#variables-and-units), [SETPOINT](#variables-and-units), [THRESHOLD](#variables-and-units) |
| `value` | Yes | Variable value | _any positive or negative number_ | | `value` | Yes | Variable value | _any positive or negative number_ |
| `unit_of_measurement` | Yes | Variable unit | [VAR_UNIT](#variables-and-units) | | `unit_of_measurement` | Yes | Variable unit | [VAR_UNIT](#variables-and-units) |
@ -581,7 +583,7 @@ Example:
```yaml ```yaml
action: lcn.var_rel action: lcn.var_rel
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
variable: var1 variable: var1
value: 10 value: 10
unit_of_measurement: % unit_of_measurement: %
@ -598,7 +600,7 @@ Reset value of variable or setpoint.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | ------------------------------------------------------------------ | | ---------------------- | -------- | ----------------------------- | ------------------------------------------------------------------ |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `variable` | No | Variable name | [VARIABLE](#variables-and-units), [SETPOINT](#variables-and-units) | | `variable` | No | Variable name | [VARIABLE](#variables-and-units), [SETPOINT](#variables-and-units) |
Example: Example:
@ -606,7 +608,7 @@ Example:
```yaml ```yaml
action: lcn.var_reset action: lcn.var_reset
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
variable: var1 variable: var1
``` ```
@ -622,7 +624,7 @@ If `state` is not defined, it is assumed to be `False`.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | -------------------------------- | | ---------------------- | -------- | ----------------------------- | -------------------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `setpoint` | No | Setpoint name | [SETPOINT](#variables-and-units) | | `setpoint` | No | Setpoint name | [SETPOINT](#variables-and-units) |
| `state` | Yes | Lock state | true, false | | `state` | Yes | Lock state | true, false |
@ -631,7 +633,7 @@ Example:
```yaml ```yaml
action: lcn.lock_regulator action: lcn.lock_regulator
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
setpoint: r1varsetpoint setpoint: r1varsetpoint
state: true state: true
``` ```
@ -646,7 +648,7 @@ If `time_unit` is not defined, it is assumed to be `seconds`.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | --------------------------------- | | ---------------------- | -------- | ----------------------------- | --------------------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `keys` | No | Keys string | | `keys` | No | Keys string |
| `state` | Yes | Keys state | [KEY_STATE](#states) | | `state` | Yes | Keys state | [KEY_STATE](#states) |
| `time` | Yes | Deferred time | 0.. | | `time` | Yes | Deferred time | 0.. |
@ -658,7 +660,7 @@ Send keys immediately:
```yaml ```yaml
action: lcn.send_keys action: lcn.send_keys
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
keys: a1a5d8 keys: a1a5d8
state: hit state: hit
``` ```
@ -667,7 +669,7 @@ Send keys deferred:
```yaml ```yaml
action: lcn.send_keys action: lcn.send_keys
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
keys: a1a5d8 keys: a1a5d8
time: 5 time: 5
time_unit: s time_unit: s
@ -683,8 +685,8 @@ If `time_unit` is not defined, it is assumed to be `seconds`.
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | --------------------------------- | | ---------------------- | -------- | ----------------------------- | --------------------------------- |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `table` | Yes | Table with keys to lock | | `table` | Yes | Table with keys to lock ||
| `state` | No | Key lock states as string | [KEY_STATE](#states) | | `state` | No | Key lock states as string | [KEY_STATE](#states) |
| `time` | Yes | Time period to lock | 0.. | | `time` | Yes | Time period to lock | 0.. |
| `time_unit` | Yes | Time unit | [TIME_UNIT](#variables-and-units) | | `time_unit` | Yes | Time unit | [TIME_UNIT](#variables-and-units) |
@ -695,7 +697,7 @@ Lock keys forever:
```yaml ```yaml
action: lcn.lock_keys action: lcn.lock_keys
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
table: a table: a
state: 1---t0-- state: 1---t0--
``` ```
@ -704,7 +706,7 @@ Lock keys for a specified time period:
```yaml ```yaml
action: lcn.lock_keys action: lcn.lock_keys
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
state: 1---t0-- state: 1---t0--
time: 10 time: 10
time_unit: s time_unit: s
@ -716,19 +718,18 @@ Send dynamic text to LCN-GTxD displays.
The displays support four rows for text messages. The displays support four rows for text messages.
Each row can be set independently and can store up to 60 characters (encoded in UTF-8). Each row can be set independently and can store up to 60 characters (encoded in UTF-8).
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ---------------------------------- | ------ | | ---------------------- | -------- | ---------------------------------- | ------ |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `row` | No | Text row 1..4 | | `row` | No | Text row 1-4 ||
| `text` | No | Text to send for the specified row | | `text` | No | Text to send for the specified row ||
Example: Example:
```yaml ```yaml
action: lcn.dyn_text action: lcn.dyn_text
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
row: 1 row: 1
text: "text in row 1" text: "text in row 1"
``` ```
@ -739,15 +740,15 @@ Send arbitrary PCK command. Only the command part of the PCK command has to be s
| Data attribute | Optional | Description | Values | | Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | ------ | | ---------------------- | -------- | ----------------------------- | ------ |
| `address` | No | [LCN address](#lcn-addresses) | | `device_id` | No | Home Assistant device id ||
| `pck` | No | PCK command | | `pck` | No | PCK command ||
Example: Example:
```yaml ```yaml
action: lcn.pck action: lcn.pck
data: data:
address: myhome.0.7 device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
pck: PIN4 pck: PIN4
``` ```