
    g                         S r SSKJr  SSKJr  SSKJr  SSKJrJ	r	  SSK
Jr  SSKJr  S	rS
r\	S\S\R                   SS4S j5       rS\S\\\4   4S jrg)zProvide info to system health.    )Any)BASE_API_URL)system_health)HomeAssistantcallback   )HacsBase)DOMAINzhttps://www.githubstatus.com/z!https://www.cloudflarestatus.com/hassregisterreturnNc                 >    SUl         UR                  [        S5        g)z!Register system health callbacks.zHome Assistant Community Storez/hacsN)domainasync_register_infosystem_health_info)r   r   s     //config/custom_components/hacs/system_health.pyasync_registerr      s     7HO  !3W=    c                   #    [         U R                  ;  a  SS0$ U R                  [            nUR                  R                  5       I Sh  vN n[        R
                  " U [        [        5      [        R
                  " U S5      [        R
                  " U S[        5      [        R
                  " U S[        5      UR                  R                  R                  R                  UR                  UR                  [        UR                  R                   5      [        UR                  R"                  5      S.	nUR$                  R&                  (       a  UR$                  R(                  US'   U$  GN$7f)zGet info for the info page.Disabledz=HACS is not loaded, but HA still requests this information...NzAhttps://raw.githubusercontent.com/hacs/integration/main/hacs.jsonzhttps://github.com/z"https://data-v2.hacs.xyz/data.json)	z
GitHub APIzGitHub Contentz
GitHub Webz	HACS DatazGitHub API Calls RemainingzInstalled VersionStagezAvailable RepositorieszDownloaded Repositories)r
   data	githubapi
rate_limitr   async_check_can_reach_urlr   GITHUB_STATUSCLOUDFLARE_STATUS	resourcescore	remainingversionstagelenrepositorieslist_alllist_downloadedsystemdisableddisabled_reason)r   hacsresponser   s       r   r   r      s    TYY[\\YYv&D^^..00H $==dLR_`'AAU
 $=='
 #<<68I
 '/mm&=&=&B&B&L&L!\\"%d&7&7&@&@"A#&t'8'8'H'H#ID$ {{;;66ZK/ 1s   A	E2E/D$E2)__doc__typingr   aiogithubapi.common.constr   homeassistant.componentsr   homeassistant.corer   r   baser	   constr
   r   r   SystemHealthRegistrationr   dictstrr    r   r   <module>r7      sp    $  2 2 6  /7  
> >-2X2X >]a > 
>= T#s(^ r   