How zubir2k/homeassistant-jejakmasjid works
Jejak Masjid is a Home Assistant integration for discovering nearby mosques and surau. Users configure a search radius and refresh interval; the integration tracks GPS for people and Home, fetches and caches nearby places, then exposes per-location sensors and a find_nearby action. Home Assistant dashboards can use the bundled interactive map card. The coordinator, service handler, and card registration are distinct runtime paths. The README documents card capabilities beyond the sampled frontend excerpts; unsampled implementation details and their internal links are not inferred.
Main entry points: coordinator.py Refresh coordinator · __init__.py Integration lifecycle · services.py find_nearby service · config_flow.py Configuration flow
Components 20
Setup & lifecycle
- Configuration flow
custom_components/jejakmasjid/config_flow.py - Integration lifecycle
custom_components/jejakmasjid/__init__.py - Settings & constants
custom_components/jejakmasjid/const.py
Place discovery
- Person & Home GPS
custom_components/jejakmasjid/coordinator.py - Refresh coordinator
custom_components/jejakmasjid/coordinator.py - Search cache
custom_components/jejakmasjid/coordinator.py - Jejak Masjid client
- Nearby place results
custom_components/jejakmasjid/coordinator.py
Home Assistant outputs
- find_nearby service
custom_components/jejakmasjid/services.py - Entity base
custom_components/jejakmasjid/entity.py - Location sensors
custom_components/jejakmasjid/sensor.py - Redacted diagnostics
custom_components/jejakmasjid/diagnostics.py
Dashboard map
- Card registration
custom_components/jejakmasjid/card_registration.py - Interactive map card
custom_components/jejakmasjid/frontend/jejakmasjid-card.js - Leaflet map library
custom_components/jejakmasjid/frontend/leaflet.js
Other components
- Integrator
- Home Assistant
- Jejak Masjid API
- Lovelace dashboard
- Automation or Assist
Connections 23
- Integrator → Configuration flow: configures
README.md - Configuration flow → Jejak Masjid API: checks connection
custom_components/jejakmasjid/config_flow.py - Configuration flow → Home Assistant: creates entry
custom_components/jejakmasjid/config_flow.py - Home Assistant → Integration lifecycle: sets up entry
custom_components/jejakmasjid/__init__.py - Integration lifecycle → Refresh coordinator: starts refresh
custom_components/jejakmasjid/__init__.py - Integration lifecycle → find_nearby service: registers service
custom_components/jejakmasjid/__init__.py - Integration lifecycle → Card registration: registers card
custom_components/jejakmasjid/__init__.py - Integration lifecycle → Location sensors: forwards platform
custom_components/jejakmasjid/__init__.py - Refresh coordinator → Person & Home GPS: reads coordinates
custom_components/jejakmasjid/coordinator.py - Refresh coordinator → Search cache: loads and saves
custom_components/jejakmasjid/coordinator.py - Refresh coordinator → Jejak Masjid client: fetches places
custom_components/jejakmasjid/coordinator.py - Jejak Masjid client → Jejak Masjid API: queries
- Refresh coordinator → Nearby place results: ranks results
custom_components/jejakmasjid/coordinator.py - find_nearby service → Jejak Masjid client: fetches places
custom_components/jejakmasjid/services.py - find_nearby service → Nearby place results: filters and limits
custom_components/jejakmasjid/services.py - Automation or Assist → find_nearby service: requests search
README.md - Location sensors → Refresh coordinator: reads updates
custom_components/jejakmasjid/sensor.py - Location sensors → Entity base: uses base
custom_components/jejakmasjid/sensor.py - Redacted diagnostics → Refresh coordinator: reads status
custom_components/jejakmasjid/diagnostics.py - Card registration → Lovelace dashboard: serves and registers
custom_components/jejakmasjid/card_registration.py - Lovelace dashboard → Interactive map card: loads resource
- Interactive map card → Home Assistant: reads sensor states
custom_components/jejakmasjid/frontend/jejakmasjid-card.js - Interactive map card → Leaflet map library: renders map with
README.md