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.
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`
Set absolute brightness of output port in percent.
| 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) |
| `brightness` | Yes | Absolute brightness in percent | 0..100 |
| `transition` | Yes | Transition (ramp) time in seconds | 0..486 |
@ -447,7 +449,7 @@ Example:
```yaml
action: lcn.output_abs
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
output: output1
brightness: 100
transition: 0
@ -459,7 +461,7 @@ Set relative brightness of output port in percent.
| 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) |
| `brightness` | Yes | Relative brightness in percent | -100..100 |
| `transition` | Yes | Transition (ramp) time in seconds | 0..486 |
@ -469,7 +471,7 @@ Example:
```yaml
action: lcn.output_rel
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
output: output1
brightness: 30
```
@ -480,7 +482,7 @@ Toggle output port.
| 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) |
| `transition` | Yes | Transition (ramp) time in seconds | 0..486 |
@ -489,7 +491,7 @@ Example:
```yaml
action: lcn.output_toggle
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
output: output1
transition: 0
```
@ -503,15 +505,15 @@ Example states: `t---001-`
| Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | ------ |
| `address` | No | [LCN address](#lcn-addresses) |
| `state` | No | Relay states as string |
| `device_id` | No | Home Assistant device id ||
| `state` | No | Relay states as string ||
Example:
```yaml
action: lcn.relays
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
state: t---001-
```
@ -521,7 +523,7 @@ Set the LED status.
| 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) |
Example:
@ -529,7 +531,7 @@ Example:
```yaml
action: lcn.led
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
led: led6
state: blink
```
@ -542,7 +544,7 @@ If `unit_of_measurement` is not defined, it is assumed to be `native`.
| 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) |
| `value` | Yes | Variable value | _any positive number_ |
| `unit_of_measurement` | Yes | Variable unit | [VAR_UNIT](#variables-and-units) |
@ -552,7 +554,7 @@ Example:
```yaml
action: lcn.var_abs
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
variable: var1
value: 75
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 |
| ---------------------- | -------- | ----------------------------- | ----------------------------------------------------------------------------------------------------- |
| `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) |
| `value` | Yes | Variable value | _any positive or negative number_ |
| `unit_of_measurement` | Yes | Variable unit | [VAR_UNIT](#variables-and-units) |
@ -581,7 +583,7 @@ Example:
```yaml
action: lcn.var_rel
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
variable: var1
value: 10
unit_of_measurement: %
@ -598,7 +600,7 @@ Reset value of variable or setpoint.
| 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) |
Example:
@ -606,7 +608,7 @@ Example:
```yaml
action: lcn.var_reset
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
variable: var1
```
@ -622,7 +624,7 @@ If `state` is not defined, it is assumed to be `False`.
| 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) |
| `state` | Yes | Lock state | true, false |
@ -631,7 +633,7 @@ Example:
```yaml
action: lcn.lock_regulator
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
setpoint: r1varsetpoint
state: true
```
@ -646,7 +648,7 @@ If `time_unit` is not defined, it is assumed to be `seconds`.
| Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | --------------------------------- |
| `address` | No | [LCN address](#lcn-addresses) |
| `device_id` | No | Home Assistant device id ||
| `keys` | No | Keys string |
| `state` | Yes | Keys state | [KEY_STATE](#states) |
| `time` | Yes | Deferred time | 0.. |
@ -658,7 +660,7 @@ Send keys immediately:
```yaml
action: lcn.send_keys
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
keys: a1a5d8
state: hit
```
@ -667,7 +669,7 @@ Send keys deferred:
```yaml
action: lcn.send_keys
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
keys: a1a5d8
time: 5
time_unit: s
@ -683,8 +685,8 @@ If `time_unit` is not defined, it is assumed to be `seconds`.
| Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ----------------------------- | --------------------------------- |
| `address` | No | [LCN address](#lcn-addresses) |
| `table` | Yes | Table with keys to lock |
| `device_id` | No | Home Assistant device id ||
| `table` | Yes | Table with keys to lock ||
| `state` | No | Key lock states as string | [KEY_STATE](#states) |
| `time` | Yes | Time period to lock | 0.. |
| `time_unit` | Yes | Time unit | [TIME_UNIT](#variables-and-units) |
@ -695,7 +697,7 @@ Lock keys forever:
```yaml
action: lcn.lock_keys
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
table: a
state: 1---t0--
```
@ -704,7 +706,7 @@ Lock keys for a specified time period:
```yaml
action: lcn.lock_keys
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
state: 1---t0--
time: 10
time_unit: s
@ -716,19 +718,18 @@ Send dynamic text to LCN-GTxD displays.
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).
| Data attribute | Optional | Description | Values |
| ---------------------- | -------- | ---------------------------------- | ------ |
| `address` | No | [LCN address](#lcn-addresses) |
| `row` | No | Text row 1..4 |
| `text` | No | Text to send for the specified row |
| `device_id` | No | Home Assistant device id ||
| `row` | No | Text row 1-4 ||
| `text` | No | Text to send for the specified row ||
Example:
```yaml
action: lcn.dyn_text
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
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 |
| ---------------------- | -------- | ----------------------------- | ------ |
| `address` | No | [LCN address](#lcn-addresses) |
| `pck` | No | PCK command |
| `device_id` | No | Home Assistant device id ||
| `pck` | No | PCK command ||
Example:
```yaml
action: lcn.pck
data:
address: myhome.0.7
device_id: 91aa039a2fb6e0b9f9ec7eb219a6b7d2
pck: PIN4
```