How zubir2k/homeassistant-mutiarahadith works
This Home Assistant integration fetches JAKIM’s currently featured hadith from MyHadith, exposes its content and metadata as a sensor, and displays it with a bundled dashboard card. Setup validates the selected source; the integration then creates a backend and coordinator for scheduled updates. The README also documents a key-gated API mode, interval options, reconfiguration, and diagnostics. API-mode featured retrieval is explicitly not implemented yet. Edges reflect calls or documented behavior visible in the excerpts; unsampled modules are represented only where the README establishes the capability.
Main entry points: __init__.py Integration lifecycle · coordinator.py Scheduled coordinator · client.py Website scraper · config_flow.py Setup and reconfigure
Components 13
Setup and lifecycle
- Setup and reconfigure
custom_components/mutiara_hadith/config_flow.py - Refresh options
custom_components/mutiara_hadith/config_flow.py - Integration lifecycle
custom_components/mutiara_hadith/__init__.py - Redacted diagnostics
custom_components/mutiara_hadith/diagnostics.py
Hadith retrieval
- Scheduled coordinator
custom_components/mutiara_hadith/coordinator.py - Website scraper
custom_components/mutiara_hadith/client.py - Hadith parsing
custom_components/mutiara_hadith/client.py - Key-gated API backend
custom_components/mutiara_hadith/client.py
Home Assistant presentation
- Hadith sensor
custom_components/mutiara_hadith/sensor.py - Dashboard card
custom_components/mutiara_hadith/frontend/mutiara-hadith-card.js
Other components
- Home Assistant user
- MyHadith service
- Home Assistant
Connections 18
- Home Assistant user → Setup and reconfigure: configures
README.md - Setup and reconfigure → Website scraper: validates source
custom_components/mutiara_hadith/config_flow.py - Setup and reconfigure → Key-gated API backend: validates key
custom_components/mutiara_hadith/config_flow.py - Home Assistant user → Refresh options: sets interval
README.md - Integration lifecycle → Scheduled coordinator: creates
custom_components/mutiara_hadith/__init__.py - Integration lifecycle → Website scraper: selects backend
custom_components/mutiara_hadith/__init__.py - Integration lifecycle → Key-gated API backend: selects backend
custom_components/mutiara_hadith/__init__.py - Scheduled coordinator → Website scraper: fetches featured
custom_components/mutiara_hadith/coordinator.py - Scheduled coordinator → Key-gated API backend: fetches featured
custom_components/mutiara_hadith/coordinator.py - Website scraper → MyHadith service: requests pages
custom_components/mutiara_hadith/client.py - Website scraper → Hadith parsing: parses responses
custom_components/mutiara_hadith/client.py - Key-gated API backend → MyHadith service: requests JSON
custom_components/mutiara_hadith/client.py - Integration lifecycle → Hadith sensor: forwards platform
custom_components/mutiara_hadith/__init__.py - Hadith sensor → Scheduled coordinator: reads update data
custom_components/mutiara_hadith/sensor.py - Integration lifecycle → Dashboard card: registers frontend
custom_components/mutiara_hadith/__init__.py - Dashboard card → Hadith sensor: renders entity
README.md - Redacted diagnostics → Scheduled coordinator: reads status
custom_components/mutiara_hadith/diagnostics.py - Home Assistant → Integration lifecycle: loads integration
custom_components/mutiara_hadith/__init__.py