Added HMIP-DLD Integration (#19151)

Co-authored-by: Joakim Sørensen <hi@ludeeus.dev>
This commit is contained in:
tobim8 2021-09-13 11:23:32 +02:00 committed by GitHub
parent 699d1a9114
commit 3c21f99322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -440,6 +440,41 @@ action:
entity_id: lock.leq1234567
```
#### Integrating HMIP-DLD
There is no available default integration for HMIP Doorlock (HMIP-DLD) in the current `pyhomeatic` implementation.
A workaround is to define a template lock in your configuration:
{% raw %}
```yaml
lock:
- platform: template
name: Basedoor
unique_id: basedoor
value_template: "{{ state_attr('homematic.ccu2', 'base_lock_status') }}"
lock:
service: homematic.set_device_value
data:
address: "002A1BE9A792D2"
channel: 1
param: LOCK_TARGET_LEVEL
value: 0
unlock:
service: homematic.set_device_value
data:
address: "002A1BE9A792D2"
channel: 1
param: LOCK_TARGET_LEVEL
value: 1
```
{% endraw %}
To get the current value of the current lock status, you have to create a system variable (in the example above it is `base_lock_status`) and create a program on CCU, which updates the variable with every change of the Lock level to `true` for locked and `false` for unlocked.
#### Detecting lost connections
When the connection to your Homematic CCU or Homegear is lost, Home Assistant will stop getting updates from devices. This may happen after rebooting the CCU for example. Due to the nature of the communication protocol this cannot be handled automatically, so you must call *homematic.reconnect* in this case. That's why it is usually a good idea to check if your Homematic integrations are still updated properly, in order to detect connection losses. This can be done in several ways through an automation: