hey everyone,
I just started with Home Assistant. I was able to integrate all my LCN Objects. From the LCN Integration Site: LCN - Home Assistant (home-assistant.io) I Understand that it is posible to write values back into LCN Variables or set a LED state. But I don’t know how. Can anyone help me with that?
writing LCN variables or setting LED states is done by using service calls. Those are special actions various integrations offer that can be used in scripts (which itself are actually services) and automations.
The easiest way to setup an automation is by using the automation editor from your Home Assistant fronted: Settings → Automations. (Ensure that the automation or default_config topic is in your configuration.yaml so the automation integration is loaded.)
Within the automation editor define your trigger (and maybe conditions) and go to the ‘actions’ sections. Here you can select services and all LCN services will appear in the list below. Most of the settings can be set via the UI. If you are unsure about the setting refer to the LCN documentation.
In addition automations and scripts can be defined in your configuration.yaml file.
Here is an example code to setup a simple automation using a LCN service call:
There is also an easy way to test service calls from the Home Assistant frontend. Go to the Developer Tools and select the services tab. Here you can select any service and test it (along with additional parameter description).
Btw.: I noticed some shortcomings in the LCN documentation (especially the missing lcn.prefix in the service names in the examples). Sorry about that, I will fix it.