Add filters to upcoming launch library launches (#92110)

Add filters to upcoming launches
This commit is contained in:
Joakim Sørensen 2023-04-27 13:36:43 +02:00 committed by GitHub
parent 7801eeb063
commit 0ef29bfc0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,9 @@ async def async_setup_entry(hass: HomeAssistant, entry: ConfigEntry) -> bool:
async def async_update() -> LaunchLibraryData:
try:
return LaunchLibraryData(
upcoming_launches=await launches.upcoming_launches(),
upcoming_launches=await launches.upcoming_launches(
filters={"limit": 1, "hide_recent_previous": "True"},
),
starship_events=await launches.starship_events(),
)
except PyLaunchesException as ex: