Update ecovacs template sensor & binary_sensor examples (#20050)

This commit is contained in:
SNoof85 2021-10-30 16:40:34 +02:00 committed by GitHub
parent 682ac4f24e
commit 62a9d55ff2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -87,13 +87,11 @@ Here's an example of how to extract the filter's lifespan to its own sensor usin
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
sensor: template:
- platform: template - sensor:
sensors: - name: "Vacuum Filter Remaining Lifespan"
vacuum_filter: unit_of_measurement: "%"
friendly_name: "Vacuum Filter Remaining Lifespan" state: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') }}"
unit_of_measurement: "%"
value_template: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') }}"
``` ```
{% endraw %} {% endraw %}
@ -104,13 +102,11 @@ Or, if you want a simple binary sensor that becomes `On` when the filter needs t
```yaml ```yaml
# Example configuration.yaml entry # Example configuration.yaml entry
binary_sensor: template:
- platform: template - binary_sensor:
sensors: - name: "Vacuum Filter"
vacuum_filter_replace: device_class: problem
friendly_name: "Vacuum Filter" state: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') <= 5 }}"
device_class: problem
value_template: "{{ state_attr('vacuum.my_vacuum_id', 'component_filter') <= 5 }}"
``` ```
{% endraw %} {% endraw %}