Add if subscription is active to cloud status (#68266)

This commit is contained in:
Paulus Schoutsen 2022-03-17 01:51:07 -07:00 committed by GitHub
parent d021222d6d
commit aabfa08834
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 2 deletions

View file

@ -420,7 +420,11 @@ async def _account_data(hass: HomeAssistant, cloud: Cloud):
"""Generate the auth data JSON response."""
if not cloud.is_logged_in:
return {"logged_in": False, "cloud": STATE_DISCONNECTED}
return {
"logged_in": False,
"cloud": STATE_DISCONNECTED,
"http_use_ssl": hass.config.api.use_ssl,
}
claims = cloud.claims
client = cloud.client
@ -457,6 +461,7 @@ async def _account_data(hass: HomeAssistant, cloud: Cloud):
"remote_connected": remote.is_connected,
"remote_domain": remote.instance_domain,
"http_use_ssl": hass.config.api.use_ssl,
"active_subscription": not cloud.subscription_expired,
}