Skip to content

Commit 4d2240c

Browse files
JohannJohann
authored andcommitted
fix: rename Prayer Times to Nida + fix sounds dir path
1 parent ac66a7f commit 4d2240c

34 files changed

Lines changed: 2242 additions & 23 deletions

custom_components/nida/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ async def play_adhan(hass: HomeAssistant, entry: ConfigEntry, prayer_type: str):
187187
)
188188

189189

190-
async def async_send_notification(hass: HomeAssistant, entry: ConfigEntry, message: str, title: str = "🕌 Prayer Times"):
190+
async def async_send_notification(hass: HomeAssistant, entry: ConfigEntry, message: str, title: str = "🕌 Nida"):
191191
"""Send notification if configured."""
192192
target = entry.options.get("notify_target", entry.data.get("notify_target", ""))
193193
if not target:
@@ -414,7 +414,7 @@ async def handle_test_reminder(call):
414414
async def handle_test_notification(call):
415415
"""Test notification."""
416416
options = entry.options if entry.options else entry.data
417-
custom_title = options.get("notify_title", "🕌 Prayer Times")
417+
custom_title = options.get("notify_title", "🕌 Nida")
418418
custom_msg = options.get("notify_message", "It is time for {prayer} prayer")
419419
await async_send_notification(hass, entry, custom_msg, custom_title)
420420

custom_components/nida/config_flow.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Config flow for Prayer Times."""
1+
"""Config flow for Nida."""
22
from __future__ import annotations
33
import asyncio
44
import aiohttp
@@ -157,15 +157,15 @@ async def async_step_notifications(self, user_input=None):
157157
data_schema=vol.Schema({
158158
vol.Optional("notify_on_prayer", default=False): bool,
159159
vol.Optional("notify_target", default=[]): selector.selector({"select": {"options": notify_services, "mode": "dropdown", "multiple": True, "custom_value": True}}),
160-
vol.Optional("notify_title", default="🕌 Prayer Times"): str,
160+
vol.Optional("notify_title", default="🕌 Nida"): str,
161161
vol.Optional("notify_message", default="It is time for {prayer} prayer"): str,
162162
}),
163163
)
164164

165165
async def async_step_ramadan(self, user_input=None):
166166
if user_input is not None:
167167
self._data.update(user_input)
168-
return self.async_create_entry(title=self._data.get(CONF_CITY, "Prayer Times"), data=self._data)
168+
return self.async_create_entry(title=self._data.get(CONF_CITY, "Nida"), data=self._data)
169169
jingles = {"": "— No sound —", **get_jingle_sounds()}
170170
return self.async_show_form(
171171
step_id="ramadan",
@@ -281,7 +281,7 @@ async def async_step_notifications(self, user_input=None):
281281
data_schema=vol.Schema({
282282
vol.Optional("notify_on_prayer", default=self._get("notify_on_prayer", False)): bool,
283283
vol.Optional("notify_target", default=current): selector.selector({"select": {"options": notify_services, "mode": "dropdown", "multiple": True, "custom_value": True}}),
284-
vol.Optional("notify_title", default=self._get("notify_title", "🕌 Prayer Times")): str,
284+
vol.Optional("notify_title", default=self._get("notify_title", "🕌 Nida")): str,
285285
vol.Optional("notify_message", default=self._get("notify_message", "It is time for {prayer} prayer")): str,
286286
}),
287287
)

custom_components/nida/const.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Constants for Prayer Times integration."""
1+
"""Constants for Nida integration."""
22

33
DOMAIN = "nida"
44

@@ -62,7 +62,7 @@
6262
}
6363

6464
# Pad naar de sounds map (www/sounds/ in de repo = /config/www/sounds/ op HA)
65-
_SOUNDS_DIR = "/config/www/sounds"
65+
_SOUNDS_DIR = "/config/www/nida/sounds"
6666

6767

6868
def _format_sound_label(filename: str) -> str:

custom_components/nida/sensor.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Sensor platform for Prayer Times."""
1+
"""Sensor platform for Nida."""
22
from __future__ import annotations
33

44
from datetime import datetime
@@ -82,9 +82,9 @@ def native_value(self):
8282
def device_info(self):
8383
return {
8484
"identifiers": {(DOMAIN, f"{self._entry.entry_id}_prayer")},
85-
"name": "Prayer Times",
85+
"name": "Nida",
8686
"manufacturer": "AlAdhan",
87-
"model": "Prayer Times API",
87+
"model": "AlAdhan API",
8888
}
8989

9090

@@ -108,9 +108,9 @@ def native_value(self):
108108
def device_info(self):
109109
return {
110110
"identifiers": {(DOMAIN, f"{self._entry.entry_id}_readable")},
111-
"name": "Prayer Times Readable",
111+
"name": "Nida Readable",
112112
"manufacturer": "AlAdhan",
113-
"model": "Prayer Times API",
113+
"model": "AlAdhan API",
114114
}
115115

116116

@@ -173,7 +173,7 @@ def device_info(self):
173173
"identifiers": {(DOMAIN, f"{self._entry.entry_id}_hijri")},
174174
"name": "Hijri Calendar",
175175
"manufacturer": "AlAdhan",
176-
"model": "Prayer Times API",
176+
"model": "AlAdhan API",
177177
}
178178

179179

@@ -233,9 +233,9 @@ def native_value(self):
233233
def device_info(self):
234234
return {
235235
"identifiers": {(DOMAIN, f"{self._entry.entry_id}_prayer")},
236-
"name": "Prayer Times",
236+
"name": "Nida",
237237
"manufacturer": "AlAdhan",
238-
"model": "Prayer Times API",
238+
"model": "AlAdhan API",
239239
}
240240

241241

@@ -277,7 +277,7 @@ def device_info(self):
277277
"identifiers": {(DOMAIN, f"{self._entry.entry_id}_hijri")},
278278
"name": "Hijri Calendar",
279279
"manufacturer": "AlAdhan",
280-
"model": "Prayer Times API",
280+
"model": "AlAdhan API",
281281
}
282282

283283

@@ -313,5 +313,5 @@ def device_info(self):
313313
"identifiers": {(DOMAIN, f"{self._entry.entry_id}_hijri")},
314314
"name": "Hijri Calendar",
315315
"manufacturer": "AlAdhan",
316-
"model": "Prayer Times API",
316+
"model": "AlAdhan API",
317317
}

custom_components/nida/strings.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"step": {
44
"user": {
55
"title": "بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ",
6-
"description": "Assalamu Alaikum wa Rahmatullahi wa Barakatuh 🌙\n\nWelcome to **Prayer Times** for Home Assistant.\n\nThis integration uses the free **AlAdhan API** (aladhan.com) to provide accurate daily prayer times based on your location. We are truly grateful for this wonderful free service — may Allah reward those who built and maintain it.\n\nPlease enter your city and country to get started.",
6+
"description": "Assalamu Alaikum wa Rahmatullahi wa Barakatuh 🌙\n\nWelcome to **Nida** for Home Assistant.\n\nThis integration uses the free **AlAdhan API** (aladhan.com) to provide accurate daily prayer times based on your location. We are truly grateful for this wonderful free service — may Allah reward those who built and maintain it.\n\nPlease enter your city and country to get started.",
77
"data": {
88
"city": "City",
99
"country": "Country",
@@ -69,13 +69,13 @@
6969
"invalid_location": "Invalid city or country"
7070
},
7171
"abort": {
72-
"already_configured": "Prayer Times is already configured"
72+
"already_configured": "Nida is already configured"
7373
}
7474
},
7575
"options": {
7676
"step": {
7777
"init": {
78-
"title": "Prayer Times Settings",
78+
"title": "Nida Settings",
7979
"data": {
8080
"city": "City",
8181
"country": "Country",

custom_components/nida/translations/en.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"step": {
44
"intro": {
55
"title": "Nida",
6-
"description": "**بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ**\n\n**Assalamu Alaikum wa Rahmatullahi wa Barakatuh** 🌙\n\nWelcome to **Prayer Times** for Home Assistant — a complete and customizable Islamic prayer companion for your smart home.\n\nMay Allah ﷻ accept your prayers and make this integration a means of khayr (goodness) in your household.\n\n---\n\n🕌 Location-Based Prayer Times via AlAdhan API\n🔔 Pre-Adhan Reminders with sound and spoken message\n🌅 Fajr Adhan with dedicated audio\n📢 Adhan for All Prayers with day and night volume\n📱 Device Notifications to mobile and speakers\n🌙 Ramadan Features — Suhoor alarm and Tarhim\n📅 Hijri Calendar with Islamic holidays\n\n---\n\nMay Allah reward the team at aladhan.com abundantly. Ameen. 🤲\n\n*— Iftikhar Farzan Izz Al Din Muhsin*"
6+
"description": "**بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ**\n\n**Assalamu Alaikum wa Rahmatullahi wa Barakatuh** 🌙\n\nWelcome to **Nida** for Home Assistant — a complete and customizable Islamic prayer companion for your smart home.\n\nMay Allah ﷻ accept your prayers and make this integration a means of khayr (goodness) in your household.\n\n---\n\n🕌 Location-Based Nida via AlAdhan API\n🔔 Pre-Adhan Reminders with sound and spoken message\n🌅 Fajr Adhan with dedicated audio\n📢 Adhan for All Prayers with day and night volume\n📱 Device Notifications to mobile and speakers\n🌙 Ramadan Features — Suhoor alarm and Tarhim\n📅 Hijri Calendar with Islamic holidays\n\n---\n\nMay Allah reward the team at aladhan.com abundantly. Ameen. 🤲\n\n*— Iftikhar Farzan Izz Al Din Muhsin*"
77
},
88
"location": {
99
"title": "Location & Calculation Method",
@@ -85,7 +85,7 @@
8585
"invalid_location": "Invalid city or country"
8686
},
8787
"abort": {
88-
"already_configured": "Prayer Times is already configured"
88+
"already_configured": "Nida is already configured"
8989
}
9090
},
9191
"options": {

nida.zip

31.2 MB
Binary file not shown.

0 commit comments

Comments
 (0)