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

Automation to reload timer after switch turn off manually

$
0
0

Hi, I have automation to start a timer when valve switch triggered ON, and another automation to cancel and reset the timer when the valve switch triggered OFF (Turn off the timer) but this is not cancel and reset the timer.

timer:
  vtime2:
    duration: "00:00:00"
  
  
automation test:
  - alias: Turn on the timer
    trigger:
      - platform: state
        entity_id: switch.valve_2
        to: 'on'
    action:
      - service: timer.start
        data:
          entity_id: timer.vtime2
          duration: '00:40:00'
          
  - alias: Turn off the timer
    trigger:
      - platform: state
        entity_id: switch.valve_2
        to: 'off'
    action:
      - service: timer.cancel
        entity_id: timer.vtime2

  - alias: timer finished    
    trigger:
      - platform: event
        event_type: timer.finished
        event_data:
          entity_id: timer.vtime2
    action:
      - service: switch.turn_off
        entity_id: switch.valve_2

Any help would be appreciated!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 102826

Trending Articles



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