From 6fda8d05ddb3ccd465e5a6539f62f7b9cf1935e7 Mon Sep 17 00:00:00 2001 From: Andre Lengwenus Date: Fri, 17 Jan 2025 11:28:25 +0100 Subject: [PATCH] Add tip for obtaining the device_id (#36815) --- source/_integrations/lcn.markdown | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/source/_integrations/lcn.markdown b/source/_integrations/lcn.markdown index 8814c6d968c..38f621e2299 100644 --- a/source/_integrations/lcn.markdown +++ b/source/_integrations/lcn.markdown @@ -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. +{% 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` Set absolute brightness of output port in percent.