Neato D7 cleaning duration

Is it possible to get the last cleaning duration?
The Neato integration have the attributes last cleaning start time and last cleaning end time.
Is it possible to create a template sensor from this too attributes?

I got it.
If someone is interested:

    vacuum_last_clean_duration:
      friendly_name: Vacuum last clean duration
      value_template: >-
        {% set clean_stop = (as_timestamp(states.vacuum.neato.attributes.clean_stop)) | int %}
        {% set clean_start = (as_timestamp(states.vacuum.neato.attributes.clean_start)) | int %}
        {% set duration = clean_stop - clean_start  %}
        {% set seconds = duration % 60 %}
        {% set minutes = (duration / 60)|int % 60 %}
        {% set hours = (duration / 3600)|int %}
        {{ '%0.02d:%0.02d:%0.02d' | format(hours, minutes, seconds)}}
2 Likes