import astral
import datetime
from homeassistant.const import SUN_EVENT_SUNRISE as SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET as SUN_EVENT_SUNSET
from homeassistant.core import HomeAssistant as HomeAssistant, callback as callback
from homeassistant.loader import bind_hass as bind_hass

DATA_LOCATION_CACHE: str

def get_astral_location(hass: HomeAssistant) -> astral.Location: ...
def get_astral_event_next(hass: HomeAssistant, event: str, utc_point_in_time: Union[datetime.datetime, None]=..., offset: Union[datetime.timedelta, None]=...) -> datetime.datetime: ...
def get_location_astral_event_next(location: astral.Location, event: str, utc_point_in_time: Union[datetime.datetime, None]=..., offset: Union[datetime.timedelta, None]=...) -> datetime.datetime: ...
def get_astral_event_date(hass: HomeAssistant, event: str, date: Union[datetime.date, datetime.datetime, None]=...) -> Union[datetime.datetime, None]: ...
def is_up(hass: HomeAssistant, utc_point_in_time: Union[datetime.datetime, None]=...) -> bool: ...
