alias: notify_email_ntfy
description: ''
fields:
  message:
    description: Treść powiadomienia
    example: Wykryto ruch w salonie
  title:
    description: Tytuł powiadomienia
    example: Alarm
sequence:
- action: rest_command.ntfy_send
  data:
    message: "{% if title is defined and title|length > 0 %}\n  {{ title }}: {{ message }}\n{% else %}\n  {{ message }}\n{% endif %}"
- choose:
  - conditions: '{{ title is defined and title|length > 0 }}'
    sequence:
    - action: notify.email_notification
      data:
        message: '{{ message }}'
        title: '{{ title }}'
  default:
  - action: notify.email_notification
    data:
      message: ''
      title: '{{ message }}'
