Clarify details of sensor created by websocket_api (#17118)

Co-authored-by: Franck Nijhof <git@frenck.dev>
This commit is contained in:
Tom Brien 2021-03-24 19:51:04 +00:00 committed by GitHub
parent 81beb308c3
commit a438d968c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 33 deletions

View File

@ -1,29 +0,0 @@
---
title: "Websocket Connections Sensor"
description: "Instructions on how to count connected clients within Home Assistant."
logo: home-assistant.png
ha_category:
- Utility
- Sensor
ha_release: 0.33
ha_iot_class: Local Push
ha_quality_scale: internal
ha_domain: websocket_api
---
The `websocket_api` sensor platform shows how many clients are connected to the stream API.
## Configuration
To add the connected clients to your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
sensor:
- platform: websocket_api
```
### Note
This replaces the previous `api_streams` sensor.
The default sensor name is `connected_clients`.

View File

@ -26,10 +26,12 @@ For details to use the WebSocket API, please refer to the [WebSocket API documen
## Track current connections
The websocket API provides a sensor that will keep track of the number of current connected clients. You can add it by adding the following to your configuration:
The WebSocket API provides a sensor that will keep track of the number of currently connected clients. You can add it by adding the following to your configuration:
```yaml
# Example configuration.yaml entry
sensor:
platform: websocket_api
- platform: websocket_api
```
This will create a sensor called `sensor.connected_clients` whose value is the total number of connected clients.

View File

@ -635,8 +635,8 @@
/components/sensor.amcrest /integrations/amcrest
/components/sensor.android_ip_webcam /integrations/android_ip_webcam#sensor
/components/sensor.apcupsd /integrations/apcupsd#sensor
/components/sensor.api_stream /integrations/sensor.websocket_api
/components/sensor.api_streams /integrations/sensor.websocket_api
/components/sensor.api_stream /integrations/websocket_api
/components/sensor.api_streams /integrations/websocket_api
/components/sensor.aqualogic /integrations/aqualogic#sensor
/components/sensor.arduino /integrations/arduino#sensor
/components/sensor.arest /integrations/arest#sensor
@ -1076,6 +1076,7 @@
/integrations/fan.xiaomi_miio /integrations/xiaomi_miio
/integrations/light.xiaomi_miio /integrations/xiaomi_miio
/integrations/remote.xiaomi_miio /integrations/xiaomi_miio
/integrations/sensor.websocket_api /integrations/websocket_api
/integrations/sensor.xiaomi_miio /integrations/xiaomi_miio
/integrations/switch.xiaomi_miio /integrations/xiaomi_miio
/integrations/vacuum.xiaomi_miio /integrations/xiaomi_miio