captain380

NEW MAIN FILE EDITOR

Mar 31st, 2026 (edited)
16
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.10 KB | None | 0 0
  1. - sensor:
  2. name: "Hijri Date Raw"
  3. command: >-
  4. curl -s 'https://www.khaleejtimes.com/prayer-time-uae/dubai' |
  5. grep -o '"todaysPrayerTimings":{[^}]*}' |
  6. python3 -c "import re,sys; d=sys.stdin.read(); day=re.search(r'\"hijri_day\":\"([^\"]+)\"',d).group(1); month=re.search(r'\"month\":\"([^\"]+)\"',d).group(1); print(day+' '+month)"
  7. scan_interval: 3600
  8. value_template: "{{ value }}"
  9.  
  10.  
  11. - sensor:
  12. name: "Hijri Date Raw"
  13. command: >-
  14. curl -s 'https://www.khaleejtimes.com/prayer-time-uae/dubai' |
  15. grep -o '"todaysPrayerTimings":{[^}]*}' |
  16. python3 -c "import re,sys; d=sys.stdin.read(); day=re.search(r'\"hijri_day\":\"([^\"]+)\"',d).group(1); month=re.search(r'\"month\":\"([^\"]+)\"',d).group(1); print(day+' '+month)"
  17. scan_interval: 3600
  18. value_template: "{{ value }}"
  19.  
  20.  
  21. - sensor:
  22. name: "Islamic Year Raw"
  23. command: "curl -s 'https://www.khaleejtimes.com/prayer-time-uae/dubai' | grep -oE '144[0-9]' | head -1"
  24. scan_interval: 86400 # Update once per day
  25. value_template: "{{ value }}"
  26.  
Advertisement
Add Comment
Please, Sign In to add comment