Remove deprecated html5 GCM YAML configuration (#25143)

This commit is contained in:
Milan Meulemans 2022-12-04 18:38:05 +01:00 committed by GitHub
parent 4835606703
commit 89ee64f1c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,12 +19,6 @@ HTML5 push notifications **do not** work on iOS.
</div>
<div class='note warning'>
The GCM configuration option is deprecated and stopped working in May 2019, see [https://developers.google.com/cloud-messaging/faq](https://developers.google.com/cloud-messaging/faq). If you are installing this platform for the first time, follow the VAPID configuration steps. To migrate your current installation from GCM to VAPID configuration, follow the instructions below. You can skip the first 3 steps and continue in step 4 with your existing project. You will also need to delete `html5_push_registrations.conf` and [re-enable the notifications in your browser](#setting-up-your-browser).
</div>
## Configuration
To enable this platform, add the following lines to your `configuration.yaml` file:
@ -33,30 +27,12 @@ To enable this platform, add the following lines to your `configuration.yaml` fi
# Example configuration.yaml entry
notify:
- platform: html5
name: NOTIFIER_NAME
vapid_pub_key: YOUR_PUBLIC_KEY
vapid_prv_key: YOUR_PRIVATE_KEY
vapid_email: YOUR_EMAIL
```
Or
```yaml
# Example configuration.yaml entry.
# Warning: this option will be deprecated soon!
notify:
- platform: html5
name: NOTIFIER_NAME
gcm_api_key: YOUR_API_KEY
gcm_sender_id: YOUR_SENDER_ID
```
{% configuration %}
name:
description: Setting the optional parameter `name` allows multiple notifiers to be created. The notifier will bind to the service `notify.NOTIFIER_NAME`.
required: false
type: string
default: notify
vapid_pub_key:
description: The VAPID public key generated by Google (this is the key that is immediately visible under "webpush certificates"), [see configuring the platform](#configuring-the-platform).
required: true
@ -69,14 +45,6 @@ vapid_email:
description: The e-mail account of your Google account associated with your Firebase project, [see configuring the platform](#configuring-the-platform).
required: true
type: string
gcm_api_key:
description: The API Server key provided to you by Google for Google Cloud Messaging (GCM).
required: true
type: string
gcm_sender_id:
description: The sender ID provided to you by Google for Google Cloud Messaging (GCM).
required: true
type: string
{% endconfiguration %}
### Requirements
@ -120,7 +88,7 @@ Assuming the previous test completed successfully and your browser was registere
{% my developer_services badge %}
1. Click on the My button above, or open Home Assistant in Chrome or Firefox, open the sidebar and click the Services button at the bottom (shaped like a remote control), located below the Developer Tools.
2. From the Services dropdown, search for your HTML5 notify service (e.g., notify.NOTIFIER_NAME) and select it.
2. From the Services dropdown, search for your HTML5 notify service (notify.html5) and select it.
3. In the Service Data text box enter: `{"message":"hello world"}`, then press the CALL SERVICE button.
4. If everything worked you should see a popup notification.
@ -176,7 +144,7 @@ Example of adding a tag to your notification. This won't create new notification
- platform: state
entity_id: sensor.sensor
action:
service: notify.notify
service: notify.html5
data:
message: "Last known sensor state is {{ states('sensor.sensor') }}."
data: