weeemrcb

PS1 NFC Webhook

Aug 16th, 2026 (edited)
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.25 KB | Source Code | 0 0
  1. alias: PS1 NFC Webhook
  2. description: ""
  3. triggers:
  4.   - alias: Webhook PS1 Bucket Emptied
  5.     allowed_methods:
  6.      - POST
  7.       - PUT
  8.     local_only: true
  9.     id: PS1-bucket-emptied
  10.     trigger: webhook
  11.     webhook_id: PS1BucketHasBeenEmptied
  12. conditions: []
  13. actions:
  14.   - choose:
  15.       - conditions:
  16.           - condition: trigger
  17.             id:
  18.              - PS1-bucket-emptied
  19.         sequence:
  20.           - action: timer.cancel
  21.             metadata: {}
  22.             target:
  23.               entity_id:
  24.                - timer.PS1_bucket_timer
  25.                 - timer.PS1_runtime_timer
  26.             data: {}
  27.           - action: tts.speak
  28.             metadata: {}
  29.             target:
  30.               entity_id: tts.piper
  31.             data:
  32.               cache: true
  33.               media_player_entity_id: media_player.weem_office_tablet
  34.               message: Aircon Bucket timer has been reset
  35.             alias: Piper TTS Bucket Empty
  36.             continue_on_error: true
  37.           - delay:
  38.               hours: 0
  39.               minutes: 0
  40.               seconds: 5
  41.               milliseconds: 0
  42.           - if:
  43.               - condition: state
  44.                 entity_id: climate.midea_portasplit_12000btu
  45.                 state:
  46.                  - cool
  47.             then:
  48.               - action: notify.ntfy_lowpri
  49.                 data:
  50.                   title: "{{ now().strftime('%Y/%m/%d @ %H:%M') }}"
  51.                   message: PS1 Bucket emptied and timers reset
  52.                 continue_on_error: true
  53.               - action: timer.start
  54.                 metadata: {}
  55.                 target:
  56.                   entity_id:
  57.                    - timer.PS1_bucket_timer
  58.                     - timer.PS1_runtime_timer
  59.                 data: {}
  60.             else:
  61.               - action: notify.ntfy_general
  62.                 data:
  63.                   message: PS1 timers Cancelled
  64.                   title: "{{ now().strftime('%Y/%m/%d @ %H:%M') }}"
  65.                 continue_on_error: true
  66.               - action: timer.cancel
  67.                 metadata: {}
  68.                 target:
  69.                   entity_id:
  70.                    - timer.PS1_bucket_timer
  71.                     - timer.PS1_runtime_timer
  72.                 data: {}
  73. mode: parallel
  74. max: 10
Advertisement
Add Comment
Please, Sign In to add comment