Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - sensor:
- name: "Hijri Date Raw"
- command: >-
- curl -s 'https://www.khaleejtimes.com/prayer-time-uae/dubai' |
- grep -o '"todaysPrayerTimings":{[^}]*}' |
- 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)"
- scan_interval: 3600
- value_template: "{{ value }}"
- - sensor:
- name: "Hijri Date Raw"
- command: >-
- curl -s 'https://www.khaleejtimes.com/prayer-time-uae/dubai' |
- grep -o '"todaysPrayerTimings":{[^}]*}' |
- 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)"
- scan_interval: 3600
- value_template: "{{ value }}"
- - sensor:
- name: "Islamic Year Raw"
- command: "curl -s 'https://www.khaleejtimes.com/prayer-time-uae/dubai' | grep -oE '144[0-9]' | head -1"
- scan_interval: 86400 # Update once per day
- value_template: "{{ value }}"
Advertisement
Add Comment
Please, Sign In to add comment