Merge branch 'next' into rc

This commit is contained in:
Franck Nijhof 2022-05-25 20:53:56 +02:00
commit afaea4eac9
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
7 changed files with 107 additions and 49 deletions

View File

@ -41,8 +41,20 @@ Note that it depends on the appliance and on API permissions which of the featur
- Application ID: Home Assistant (or whatever name makes sense to you)
- OAuth Flow: Authorization Code Grant Flow
- Redirect URI: "`<HOME_ASSISTANT_URL>/auth/external/callback`
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration / authentication process. Internal examples: `http://192.168.0.2:8123/auth/external/callback`, `http://homeassistant.local:8123/auth/external/callback`."
- Redirect URI: `https://my.home-assistant.io/redirect/oauth`
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the redirect URI
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Internal examples: `http://192.168.0.2:8123/auth/external/callback`, `http://homeassistant.local:8123/auth/external/callback`."
{% enddetails %}
Next, add the following to your `configuration.yaml` file:

View File

@ -27,7 +27,20 @@ To set up this component, you first **must** set up a developer account with Hon
1. Go to the [developer site](https://developer.honeywellhome.com) and register with an account.
1. Next, create a [new app](https://developer.honeywellhome.com/user/me/apps/add) via the `My Apps` section.
1. App Name: You can use any name here.
1. Callback URL: This needs to be the URL of your Home Assistant instance + `/auth/external/callback`. For example: `http://192.168.1.123:8123/auth/external/callback`.
1. Callback URL: `https://my.home-assistant.io/redirect/oauth`
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the redirect URI
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Internal examples: `http://192.168.0.2:8123/auth/external/callback`, `http://homeassistant.local:8123/auth/external/callback`."
{% enddetails %}
Once your app is created, copy the `Consumer Key` and `Consumer Secret`. These will be your `client_id` and `client_secret` to add to your `configuration.yaml`:

View File

@ -38,14 +38,28 @@ There is support for the following platform types within Home Assistant:
You will have to enter a name, a description and your redirect URL.
If Home Assistant runs on `https://hass.example.com` your redirect URL would be `https://hass.example.com/auth/external/callback`.
Please note that your instance must be accessible via HTTPS. However, your instance does not need to be exposed to the Internet.
Use `https://my.home-assistant.io/redirect/oauth` as the redirect URL.
You have to select all three scopes (`public_profile`, `control_robots` and `maps`).
</div>
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the redirect URI
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Internal examples: `https://192.168.0.2:8123/auth/external/callback`, `https://homeassistant.local:8123/auth/external/callback`."
Please note that your instance must be accessible via HTTPS. However, your
instance does not need to be exposed to the Internet.
{% enddetails %}
2. Add the newly created `client_id` and `client_secret` to your configuration.yaml:
```yaml
@ -56,7 +70,6 @@ neato:
```
3. Restart Home Assistant
4. Make sure you visit Home Assistant via a the same domain you used as `redirect_url` before
{% configuration %}
client_id:

View File

@ -51,14 +51,22 @@ before configuring Spotify.
- Select **Create An App**. Enter any name and description.
- Once your application is created, view it and copy your **Client ID** and **Client Secret**, which are used in the Home Assistant [configuration file below](#configuration).
- Enter the **Edit Settings** dialog of your newly-created application and add a *Redirect URI*:
- If you are not using SSL: `http://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback`
- If you are using SSL: `https://<your_home_assistant_url_or_local_ip>:<port>/auth/external/callback`
- Note Spotify does a case-sensitive match of the fields above, as such ensure the Redirect URI is all lower case.
`https://my.home-assistant.io/redirect/oauth`.
Note: Spotify does a case-sensitive match of the fields above, as such ensure the Redirect URI is all lower case.
- Click **Save** after adding the URI.
<div class='note'>
Your Home Assistant instance does not need to be exposed to the internet. It works just fine with local IP addresses.
</div>
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the redirect URI
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Internal examples: `http://192.168.0.2:8123/auth/external/callback`, `http://homeassistant.local:8123/auth/external/callback`."
{% enddetails %}
See [Application Credentials](/integrations/application_credentials) for instructions on how to configure your *Client ID* and *Client Secret*.

View File

@ -52,7 +52,7 @@ In order to be able to use this component, you'll need to sign up for a free Too
2. Open the "[My Apps](https://developer.toon.eu/user/me/apps)" page and click on "Add a new App" button on the top right.
3. The "Add App" page shows a form with two fields:
- **App Name**: Can be anything you like, for example, "Home Assistant" will just do.
- **Callback URL**: `https://homeassistant.local:8123/auth/external/callback` (Please replace the first part of the URL with the internal URL of your Home Assistant frontend).
- **Callback URL**: `https://my.home-assistant.io/redirect/oauth`.
4. Click on "Create App" to complete the creation process.
5. Open the "[My Apps](https://developer.toon.eu/user/me/apps)" page again and click on the app that you've just created.
6. You need the codes now shown: "Consumer Key" and "Consumer Secret".
@ -78,6 +78,19 @@ client_secret:
{% include integrations/config_flow.md %}
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the Callback URL
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Internal examples: `http://192.168.0.2:8123/auth/external/callback`, `http://homeassistant.local:8123/auth/external/callback`."
{% enddetails %}
## Binary Sensor
The Toon integration provides the following binary sensors:

View File

@ -18,7 +18,7 @@ ha_integration_type: integration
The `withings` sensor platform consumes data from various health products produced by [Withings](https://www.withings.com).
## Setup (Simple)
## Setup
For simplicity, these instructions assume your installation uses Home Assistant Cloud.
@ -31,11 +31,29 @@ Values for your account:
- Logo: Any reasonable picture will do.
- Description: Personal app for collecting my data.
- Contact Email: Your email address
- Callback Uri: `https://YOUR_NABU_CASA_ID.ui.nabu.casa/auth/external/callback`.
- Callback Uri: `https://my.home-assistant.io/redirect/oauth`.
- Company: Home Assistant
Once saved, the "Client Id" and "Consumer Secret" fields will be populated. You will need these in the next step.
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the redirect URI
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Withings will validate (with HTTP HEAD) these requirements each time you save your Withings developer account. When these checks fail, the Withings UI is not always clear about why.
- Home Assistant (For create/update of Withings developer account):
- Publicly accessible.
- Running on a fully qualified domain name.
- Running over HTTPS signed by a globally recognized Certificate Authority. Let's Encrypt will work.
{% enddetails %}
### Step 2 - Configure Home Assistant
- Add the Withings configuration YAML.
@ -62,38 +80,6 @@ Once saved, the "Client Id" and "Consumer Secret" fields will be populated. You
- If `use_webhook` is not enabled:
- Every 10 minutes.
## Setup (Advanced)
For advanced users who are NOT using Home Assistant Cloud. This is not intended to be a complete step-by-step guide.
### Requirements
Withings will validate (with HTTP HEAD) these requirements each time you save your Withings developer account. When these checks fail, the Withings UI is not always clear about why.
- Home Assistant (For create/update of Withings developer account):
- Publicly accessible.
- Running on a fully qualified domain name.
- Running over HTTPS signed by a globally recognized Certificate Authority. Let's Encrypt will work.
- Home Assistant (For adding the integration)
- Home Assistant's `external_url` needs to be set to match the `redirect uri` provided for your Withings account.
### Steps
- Create a developer account with the same steps from the instructions above.
- The `redirect uri` should look like `https://<MY_DOMAIN_NAME>/auth/external/callback`.
- Configure Home Assistant's URL. This guarantees Withings will receive the proper redirect_uri. When adding the integration, Withings will throw an error if this is not setup correctly.
```yaml
homeassistant:
external_url: https://<MY_DOMAIN_NAME>
```
- Configure the Withings integration in your configuration YAML (see above).
- Add the integration (see above).
- The following only applied if you chose to close off Home Assistant from the public after setting up your Withings account.
After authorizing finishing authorization, your browser will redirect back to `https://<MY_DOMAIN_NAME>/auth/external/callback`. Since that is no longer public,
your browser will return an error saying it could not connect. You can get around this by modifying the URL (in the browser)
to point to your local address of Home Assistant. So your browser's URL looked like `https://<MY_DOMAIN_NAME>/auth/external/callback`
but now change it to something like `https://192.168.1.11:8123/auth/external/callback`.
## Configuration
```yaml

View File

@ -286,9 +286,22 @@ If you prefer not to use the Home Assistant account linking service, you may man
- Register a new application in [Azure AD](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade)
- Name your app
- Select "Personal Microsoft accounts only" under supported account types
- For Redirect URI, add: `https://<EXTERNAL_HOME_ASSISTANT_URL>/auth/external/callback`
- For Redirect URI, add: `https://my.home-assistant.io/redirect/oauth`
- Copy your Application (client) ID for later use
- On the App Page, navigate to "Certificates & secrets"
- Generate a new client secret and save for later use
You may then add the credentials to [Application Credentials](/integrations/application_credentials/) and then setup the integration.
{% details "I have manually disabled My Home Assistant" %}
If you don't have [My Home Assistant](/integrations/my) on your installation,
you can use `<HOME_ASSISTANT_URL>/auth/external/callback` as the redirect URI
instead.
The `<HOME_ASSISTANT_URL>` must be the same as used during the configuration/
authentication process.
Internal examples: `http://192.168.0.2:8123/auth/external/callback`, `http://homeassistant.local:8123/auth/external/callback`."
{% enddetails %}