TTS / Send alert when washing machine is finished

View All Rules

## washing_machine Alerts

alias: TTS / Send alert when washing machine is finished
trigger:
  - platform: state
    entity_id: sensor.gf_dinning_washing_machine_status
    to: Clean
    for:
      minutes: 1
  - platform: state
    entity_id: person.stuart
    to: 'home'
    for:
      minutes: 2
  - platform: time
    at: '20:45:00'
condition:
  condition: and
  conditions:
    - condition: time
      before: '21:00:00'
      after: '08:30:00'
    - condition: state
      entity_id: group.people_family
      state: 'home'
    - condition: state
      entity_id: input_select.gf_dinning_washing_machine_status
      state: Clean
    - condition: state
      entity_id: input_boolean.enable_washing_machine_notification
      state: 'on'
    - condition: template
      value_template: >
        {% if states.automation.send_alert_when_washing_machine_is_finished.last_triggered is not none %}
          {% if as_timestamp(now()) | int   -  as_timestamp(states.automation.send_alert_when_washing_machine_is_finished.attributes.last_triggered) | int > 1800 %} true {% else %} false
          {% endif %}
        {% else %}
        false
        {% endif %}
action:
  - service: script.notify_tts_zone_upstairs
    data_template:
      room: "everywhere"
      value1: "The washing machine has finished and is ready to be emptied"
  - condition: or
    conditions:
      - condition: state
        entity_id: input_boolean.text_notifications
        state: 'on'
  - service: notify.signal_stuart
    data:
      message: "That's the washing machine finished"

© 2020. Some rights reserved. The contents of this site is released under a Creative Commons Attribution-Share Alike license.