Update homematic templates examples (#20053)

This commit is contained in:
SNoof85 2021-10-30 16:54:47 +02:00 committed by GitHub
parent 6a4497cfb2
commit 5f6341018a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -219,13 +219,10 @@ Most devices have, besides their state, additional attributes like their battery
{% raw %} {% raw %}
```yaml ```yaml
sensor: template:
- platform: template - sensor:
sensors: - name: "Bedroom valve"
bedroom_valve: state: "{{ state_attr('climate.leq123456', 'level') }}"
value_template: "{{ state_attr('climate.leq123456', 'level') }}"
entity_id: climate.leq123456
friendly_name: "Bedroom valve"
``` ```
{% endraw %} {% endraw %}
@ -484,16 +481,11 @@ When the connection to your Homematic CCU or Homegear is lost, Home Assistant wi
{% raw %} {% raw %}
```yaml ```yaml
binary_sensor: template:
- platform: template - binary_sensor:
sensors: - name: "Homematic is sending updates"
homematic_up: state: >-
friendly_name: "Homematic is sending updates" {{ now() - as_timestamp(state_attr('sensor.office_voltage', 'last_changed'), 601) < 600 }}
entity_id:
- sensor.office_voltage
- sensor.time
value_template: >-
{{ as_timestamp(now()) - as_timestamp(state_attr('sensor.office_voltage', 'last_changed')) < 600 }}
automation: automation:
- alias: "Homematic Reconnect" - alias: "Homematic Reconnect"
@ -529,12 +521,11 @@ automation:
{% raw %} {% raw %}
```yaml ```yaml
- platform: template template:
sensors: - sensor:
v_last_reboot: - name: "v last reboot"
value_template: "{{ state_attr('homematic.ccu2', 'V_Last_Reboot') or '01.01.1970 00:00:00' }}" state: "{{ state_attr('homematic.ccu2', 'V_Last_Reboot') or '01.01.1970 00:00:00' }}"
icon_template: "mdi:clock" icon: "mdi:clock"
entity_id: homematic.ccu2
``` ```
{% endraw %} {% endraw %}