Aurora & ISS sensors for Home Assistant
Free JSON endpoints for 550+ cities — add a live “aurora tonight?” sensor and a next-ISS-pass sensor with plain RESTful-sensor YAML. No API key, no custom component, no cloud dependency beyond one small HTTP call.
Aurora forecast sensor
Returns tonight's odds (likely / possible / unlikely / never), the live Kp index and the Kp threshold your city actually needs (same engine as our aurora forecast pages). Data refreshes every 15 minutes from NOAA SWPC.
# configuration.yaml — live aurora odds for your city (swap "oslo" for
# your city slug — find it at gocosmik.com/aurora)
rest:
- resource: https://gocosmik.com/api/widget/aurora/oslo
scan_interval: 1800
sensor:
- name: "Aurora odds tonight"
value_template: "{{ value_json.odds }}"
json_attributes:
- kp_now
- kp_tonight_max
- kp_required
- name: "Kp index now"
value_template: "{{ value_json.kp_now }}"
unit_of_measurement: "Kp"Next ISS pass sensor
The next Space Station pass above 10° over your city, computed with SGP4 from the latest orbital elements — same numbers as our ISS pass pages.
# Next visible ISS pass over your city (swap "london" for your slug —
# find it at gocosmik.com/iss-over)
rest:
- resource: https://gocosmik.com/api/widget/iss/london
scan_interval: 900
sensor:
- name: "Next ISS pass"
value_template: "{{ value_json.next_pass.start_local if value_json.next_pass else 'none in 72h' }}"
json_attributes_path: "$.next_pass"
json_attributes:
- start_utc
- max_elevation_deg
- duration_minAutomation ideas
- Flash a light and push a phone notification when aurora odds turn likely:
# Automation: flash the living-room lights green when aurora odds
# turn "likely" — the sky is calling.
automation:
- alias: "Aurora likely tonight"
trigger:
- platform: state
entity_id: sensor.aurora_odds_tonight
to: "likely"
action:
- service: light.turn_on
target: { entity_id: light.living_room }
data: { color_name: green, flash: long }
- service: notify.mobile_app_your_phone
data:
message: "🌌 Aurora likely tonight — get away from city lights and look north!"- Announce “the ISS rises in 10 minutes” on a speaker using the
start_utcattribute and a template trigger. - Show
kp_nowon a wall-mounted dashboard next to the weather card.
API details
GET /api/widget/aurora/<city-slug>— Kp now, tonight's max, required Kp, odds. Cached 15 min.GET /api/widget/iss/<city-slug>— next pass (UTC + local), elevation, duration, pass count 72h. Cached 10 min.- City slugs are the last part of any city URL on /aurora or /iss-over.
- Free for personal use, CORS-open, no key. Cite “data: Cosmik” if you publish with it. Heavier or commercial use: see API access.
Prefer a visual embed instead? The same data ships as copy-paste iframe widgets. Questions or feature requests: hello@gocosmik.com.



