From d6bf73ae8c8a584652d2f62719f75410d1724c70 Mon Sep 17 00:00:00 2001 From: brefra Date: Mon, 6 Jan 2020 10:19:29 +0100 Subject: [PATCH] Add automation example to Velbus integration (#11623) * Add automation example to Velbus integration * :pencil2: Tweak Co-authored-by: Franck Nijhof --- source/_integrations/velbus.markdown | 58 +++++++++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/source/_integrations/velbus.markdown b/source/_integrations/velbus.markdown index 9600396318a..235dd9ccf91 100644 --- a/source/_integrations/velbus.markdown +++ b/source/_integrations/velbus.markdown @@ -13,7 +13,7 @@ ha_iot_class: Local Push ha_release: "0.50" --- -The `velbus` integration supports the Velbus USB, Velbus serial and a TCP/IP gateway. +The `velbus` integration is used to control [Velbus](https://www.velbus.eu/?lang=en) modules. It supports the Velbus USB, Velbus serial and a TCP/IP gateway. There is currently support for the following device types within Home Assistant: @@ -24,6 +24,8 @@ There is currently support for the following device types within Home Assistant: - Cover - Light +The pushbutton LEDs of input modules are disabled by default. These can be enabled from the `Devices` panel in the `Configuration` page of the web interface. + ## Configuration There are 2 options in configuring the velbus integration: @@ -50,3 +52,57 @@ port: required: true type: string {% endconfiguration %} + +## Example automation + +The Velbus integration allows you to link a Velbus button (i.e., a button of a [VMBGPOD](https://www.velbus.eu/products/view/?id=416302&lang=en) module) to a controllable entity of Home Assistant. +The actual linking can be realized by two automation rules. One rule to control the device using the push button and a second rule to update the LED state of the push button as soon as the entity state changes. + +```yaml +# Control light living from Velbus push_button_10 +- id: 'Control_light_living_from_Velbus' + alias: Control light living using Velbus push_button_10 + trigger: + - entity_id: binary_sensor.push_button_10 + platform: state + to: 'on' + condition: [] + action: + - entity_id: light.living + service: light.toggle + +# Keep status LED push_button_10 in sync to status light living +- id: 'Update LED of push_button_10' + alias: Update LED state of push_button_10 + trigger: + - entity_id: light.living + platform: state + to: 'on' + - entity_id: light.living + platform: state + to: 'off' + condition: [] + action: + - condition: or + conditions: + - condition: and + conditions: + - condition: state + entity_id: light.led_push_button_10 + state: 'on' + - condition: state + entity_id: light.living + state: 'off' + - condition: and + conditions: + - condition: state + entity_id: light.led_push_button_10 + state: 'off' + - condition: state + entity_id: light.living + state: 'on' + - entity_id: light.led_push_button_10 + service: light.toggle +``` + +