Quantcast
Viewing all articles
Browse latest Browse all 104586

Time between two events (on/off)

@h4nc wrote:

I’d like to get a notification when my vacuum cleaner is finished. The message should contain information about how long the vacuum cleaner was cleaning.

- alias: vacuum time notification
  trigger:
    platform: state
    entity_id: vacuum.deebot
    from: 'on'
    to: 'off'
  action:
    - service: notify.device1
      data:
        message: "time: {{ relative_time(states.vacuum.deebot.last_changed) }}"

I think this won’t work, because the last change will always be right now. How is it possible to measure the time between the last on and off event? @petro could you help (again).

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 104586

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>