Add tip for obtaining the device_id (#36815)

This commit is contained in:
Andre Lengwenus 2025-01-17 11:28:25 +01:00 committed by GitHub
parent 28cfe146c2
commit 6fda8d05dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -433,6 +433,20 @@ Refer to the [Performing actions](/docs/scripts/service-calls) page for examples
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. 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.
{% tip %}
A simple method to obtain the `device_id` for LCN modules in automations and scripts is to use a template with the `device_id()` function as detailed [here](/docs/configuration/templating/#devices). This allows for finding the `device_id` using the module name as shown in the frontend or configured in the LCN-PRO software.
{% raw %}
```yaml
action: lcn.pck
data:
device_id: "{{ device_id('Module name') }}"
pck: PIN4
```
{% endraw %}
{% endtip %}
### Action: `output_abs` ### Action: `output_abs`
Set absolute brightness of output port in percent. Set absolute brightness of output port in percent.