2024-10-18 10:08:04 +00:00
|
|
|
---
|
|
|
|
sensor:
|
|
|
|
- name: valetudo_rockrobo_main_filter_duration
|
|
|
|
state: >-
|
|
|
|
{% set minutes = states("sensor.valetudo_rockrobo_main_filter") | int(0) %}
|
|
|
|
{% set hours = ((minutes % 1440) / 60) | int %}
|
|
|
|
{% set days = (minutes / 1440) | int %}
|
|
|
|
{%- if minutes >= 60 -%}
|
|
|
|
{%- if days > 0 %}{{ days }}d{% endif -%}
|
|
|
|
{%- if hours > 0 -%}
|
|
|
|
{{ ' ' + hours | string if days > 0 else hours }}h
|
2024-10-17 19:45:45 +00:00
|
|
|
{%- endif -%}
|
2024-10-18 10:08:04 +00:00
|
|
|
{%- else -%}
|
|
|
|
{{ minutes }}min
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
- name: valetudo_rockrobo_right_brush_duration
|
|
|
|
state: >-
|
|
|
|
{% set minutes = states("sensor.valetudo_rockrobo_right_brush") | int(0) %}
|
|
|
|
{% set hours = ((minutes % 1440) / 60) | int %}
|
|
|
|
{% set days = (minutes / 1440) | int %}
|
|
|
|
{%- if minutes >= 60 -%}
|
|
|
|
{%- if days > 0 %}{{ days }}d{% endif -%}
|
|
|
|
{%- if hours > 0 -%}
|
|
|
|
{{ ' ' + hours | string if days > 0 else hours }}h
|
2024-10-17 19:45:45 +00:00
|
|
|
{%- endif -%}
|
2024-10-18 10:08:04 +00:00
|
|
|
{%- else -%}
|
|
|
|
{{ minutes }}min
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
- name: valetudo_rockrobo_main_brush_duration
|
|
|
|
state: >-
|
|
|
|
{% set minutes = states("sensor.valetudo_rockrobo_main_brush") | int(0) %}
|
|
|
|
{% set hours = ((minutes % 1440) / 60) | int %}
|
|
|
|
{% set days = (minutes / 1440) | int %}
|
|
|
|
{%- if minutes >= 60 -%}
|
|
|
|
{%- if days > 0 %}{{ days }}d{% endif -%}
|
|
|
|
{%- if hours > 0 -%}
|
|
|
|
{{ ' ' + hours | string if days > 0 else hours }}h
|
2024-10-17 19:45:45 +00:00
|
|
|
{%- endif -%}
|
2024-10-18 10:08:04 +00:00
|
|
|
{%- else -%}
|
|
|
|
{{ minutes }}min
|
|
|
|
{%- endif -%}
|
|
|
|
|
|
|
|
- name: valetudo_rockrobo_sensor_duration
|
|
|
|
state: >-
|
|
|
|
{% set minutes = states("sensor.valetudo_rockrobo_sensor_cleaning") | int(0) %}
|
|
|
|
{% set hours = ((minutes % 1440) / 60) | int %}
|
|
|
|
{% set days = (minutes / 1440) | int %}
|
|
|
|
{%- if minutes >= 60 -%}
|
|
|
|
{%- if days > 0 %}{{ days }}d{% endif -%}
|
|
|
|
{%- if hours > 0 -%}
|
|
|
|
{{ ' ' + hours | string if days > 0 else hours }}h
|
2024-10-17 19:45:45 +00:00
|
|
|
{%- endif -%}
|
2024-10-18 10:08:04 +00:00
|
|
|
{%- else -%}
|
|
|
|
{{ minutes }}min
|
|
|
|
{%- endif -%}
|