| 1 | """Constants for the hass-nabucasa.""" |
| 2 | |
| 3 | from __future__scip-python python python-stdlib 3.11 __future__/__init__: import annotationsscip-python python python-stdlib 3.11 __future__/annotations.annotations. |
| 4 | |
| 5 | from enumscip-python python python-stdlib 3.11 enum/__init__: import StrEnumscip-python python python-stdlib 3.11 enum/StrEnum# |
| 6 | |
| 7 | ACCOUNT_URLscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/ACCOUNT_URL. = "https://account.nabucasa.com/" |
| 8 | |
| 9 | CONFIG_DIRscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CONFIG_DIR. = ".cloud" |
| 10 | |
| 11 | REQUEST_TIMEOUTscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/REQUEST_TIMEOUT. = 10 |
| 12 | |
| 13 | TWELVE_HOURS_IN_SECONDSscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/TWELVE_HOURS_IN_SECONDS. = 12 * 60 * 60 |
| 14 | ONE_HOUR_IN_SECONDSscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/ONE_HOUR_IN_SECONDS. = 60 * 60 |
| 15 | FIVE_MINUTES_IN_SECONDSscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/FIVE_MINUTES_IN_SECONDS. = 5 * 60 |
| 16 | |
| 17 | MODE_PRODscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MODE_PROD. = "production" |
| 18 | MODE_DEVscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MODE_DEV. = "development" |
| 19 | |
| 20 | STATE_CONNECTINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/STATE_CONNECTING. = "connecting" |
| 21 | STATE_CONNECTEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/STATE_CONNECTED. = "connected" |
| 22 | STATE_DISCONNECTEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/STATE_DISCONNECTED. = "disconnected" |
| 23 | |
| 24 | DISPATCH_CERTIFICATE_STATUSscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DISPATCH_CERTIFICATE_STATUS. = "certificate_status" |
| 25 | DISPATCH_REMOTE_CONNECTscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DISPATCH_REMOTE_CONNECT. = "remote_connect" |
| 26 | DISPATCH_REMOTE_DISCONNECTscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DISPATCH_REMOTE_DISCONNECT. = "remote_disconnect" |
| 27 | DISPATCH_REMOTE_BACKEND_UPscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DISPATCH_REMOTE_BACKEND_UP. = "remote_backend_up" |
| 28 | DISPATCH_REMOTE_BACKEND_DOWNscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DISPATCH_REMOTE_BACKEND_DOWN. = "remote_backend_down" |
| 29 | |
| 30 | DEFAULT_SERVERSscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DEFAULT_SERVERS.DEFAULT_SERVERS.: dictscip-python python python-stdlib 3.11 builtins/dict#[strscip-python python python-stdlib 3.11 builtins/str#, dictscip-python python python-stdlib 3.11 builtins/dict#[strscip-python python python-stdlib 3.11 builtins/str#, strscip-python python python-stdlib 3.11 builtins/str#]] = { |
| 31 | "production": { |
| 32 | "account_link": "account-link.nabucasa.com", |
| 33 | "accounts": "accounts.nabucasa.com", |
| 34 | "acme": "acme-v02.api.letsencrypt.org", |
| 35 | "api": "api.nabucasa.com", |
| 36 | "relayer": "cloud.nabucasa.com", |
| 37 | "remotestate": "remotestate.nabucasa.com", |
| 38 | "servicehandlers": "servicehandlers.nabucasa.com", |
| 39 | }, |
| 40 | "development": {}, |
| 41 | } |
| 42 | |
| 43 | DEFAULT_VALUESscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/DEFAULT_VALUES.DEFAULT_VALUES.: dictscip-python python python-stdlib 3.11 builtins/dict#[strscip-python python python-stdlib 3.11 builtins/str#, dictscip-python python python-stdlib 3.11 builtins/dict#[strscip-python python python-stdlib 3.11 builtins/str#, strscip-python python python-stdlib 3.11 builtins/str#]] = { |
| 44 | "production": { |
| 45 | "cognito_client_id": "60i2uvhvbiref2mftj7rgcrt9u", |
| 46 | "user_pool_id": "us-east-1_87ll5WOP8", |
| 47 | "region": "us-east-1", |
| 48 | }, |
| 49 | "development": {}, |
| 50 | } |
| 51 | |
| 52 | MESSAGE_EXPIRATIONscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MESSAGE_EXPIRATION. = """ |
| 53 | It looks like your Home Assistant Cloud subscription has expired. Please check |
| 54 | your [account page](/config/cloud/account) to continue using the service. |
| 55 | """ |
| 56 | |
| 57 | MESSAGE_AUTH_FAILscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MESSAGE_AUTH_FAIL. = """ |
| 58 | You have been logged out of Home Assistant Cloud because we have been unable |
| 59 | to verify your credentials. Please [log in](/config/cloud) again to continue |
| 60 | using the service. |
| 61 | """ |
| 62 | |
| 63 | MESSAGE_REMOTE_READYscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MESSAGE_REMOTE_READY. = """ |
| 64 | Your remote access is now available. |
| 65 | You can manage your connectivity on the |
| 66 | [Cloud panel](/config/cloud) or with our [portal](https://account.nabucasa.com/). |
| 67 | """ |
| 68 | |
| 69 | MESSAGE_REMOTE_SETUPscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MESSAGE_REMOTE_SETUP. = """ |
| 70 | Unable to create a certificate. We will automatically |
| 71 | retry it and notify you when it's available. |
| 72 | """ |
| 73 | |
| 74 | MESSAGE_LOAD_CERTIFICATE_FAILUREscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/MESSAGE_LOAD_CERTIFICATE_FAILURE. = """ |
| 75 | Unable to load the certificate. We will automatically |
| 76 | recreate it and notify you when it's available. |
| 77 | """ |
| 78 | |
| 79 | |
| 80 | class CertificateStatusscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#(StrEnumscip-python python python-stdlib 3.11 enum/StrEnum#): |
| 81 | """Representation of the certificate status.""" |
| 82 | |
| 83 | ACME_ACCOUNT_CREATEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#ACME_ACCOUNT_CREATED. = "acme_account_created" |
| 84 | ACME_ACCOUNT_CREATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#ACME_ACCOUNT_CREATING. = "acme_account_creating" |
| 85 | CERTIFICATE_FINALIZATION_FAILEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CERTIFICATE_FINALIZATION_FAILED. = "certificate_finalization_failed" |
| 86 | CERTIFICATE_FINALIZINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CERTIFICATE_FINALIZING. = "certificate_finalizing" |
| 87 | CERTIFICATE_LOAD_ERRORscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CERTIFICATE_LOAD_ERROR. = "certificate_load_error" |
| 88 | CHALLENGE_ANSWER_FAILEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_ANSWER_FAILED. = "challenge_answer_failed" |
| 89 | CHALLENGE_ANSWEREDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_ANSWERED. = "challenge_answered" |
| 90 | CHALLENGE_ANSWERINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_ANSWERING. = "challenge_answering" |
| 91 | CHALLENGE_CLEANUPscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_CLEANUP. = "challenge_cleanup" |
| 92 | CHALLENGE_CREATEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_CREATED. = "challenge_created" |
| 93 | CHALLENGE_DNS_FAILEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_DNS_FAILED. = "challenge_dns_failed" |
| 94 | CHALLENGE_DNS_PROPAGATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_DNS_PROPAGATING. = "challenge_dns_propagating" |
| 95 | CHALLENGE_DNS_UPDATEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_DNS_UPDATED. = "challenge_dns_updated" |
| 96 | CHALLENGE_DNS_UPDATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_DNS_UPDATING. = "challenge_dns_updating" |
| 97 | CHALLENGE_PENDINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_PENDING. = "challenge_pending" |
| 98 | CHALLENGE_UNEXPECTED_ERRORscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CHALLENGE_UNEXPECTED_ERROR. = "challenge_unexpected_error" |
| 99 | CSR_GENERATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#CSR_GENERATING. = "csr_generating" |
| 100 | DOMAIN_VALIDATION_FAILEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#DOMAIN_VALIDATION_FAILED. = "domain_validation_failed" |
| 101 | ERRORscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#ERROR. = "error" |
| 102 | EXPIREDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#EXPIRED. = "expired" |
| 103 | EXPIRING_SOONscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#EXPIRING_SOON. = "expiring_soon" |
| 104 | GENERATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#GENERATING. = "generating" |
| 105 | INITIAL_CERT_ERRORscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#INITIAL_CERT_ERROR. = "initial_cert_error" |
| 106 | INITIAL_GENERATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#INITIAL_GENERATING. = "initial_generating" |
| 107 | INITIAL_LOADEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#INITIAL_LOADED. = "initial_loaded" |
| 108 | LOADEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#LOADED. = "loaded" |
| 109 | LOADINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#LOADING. = "loading" |
| 110 | NO_CERTIFICATEscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#NO_CERTIFICATE. = "no_certificate" |
| 111 | READYscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#READY. = "ready" |
| 112 | RENEWAL_FAILEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#RENEWAL_FAILED. = "renewal_failed" |
| 113 | RENEWAL_GENERATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#RENEWAL_GENERATING. = "renewal_generating" |
| 114 | RENEWAL_LOADEDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#RENEWAL_LOADED. = "renewal_loaded" |
| 115 | SSL_CONTEXT_ERRORscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#SSL_CONTEXT_ERROR. = "ssl_context_error" |
| 116 | VALIDATINGscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/CertificateStatus#VALIDATING. = "validating" |
| 117 | |
| 118 | |
| 119 | class SubscriptionReconnectionReasonscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/SubscriptionReconnectionReason#(StrEnumscip-python python python-stdlib 3.11 enum/StrEnum#): |
| 120 | """Subscription reconnection reason.""" |
| 121 | |
| 122 | CONNECTION_ERRORscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/SubscriptionReconnectionReason#CONNECTION_ERROR. = "connection_error" |
| 123 | NO_SUBSCRIPTIONscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/SubscriptionReconnectionReason#NO_SUBSCRIPTION. = "no_subscription" |
| 124 | SUBSCRIPTION_EXPIREDscip-python python hass-nabucasa 0.0.0 `hass_nabucasa.const`/SubscriptionReconnectionReason#SUBSCRIPTION_EXPIRED. = "subscription_expired" |