Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 95413

Time between two events (on/off)

$
0
0

@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 95413

Trending Articles