From a438d968c7b4eeec5456ea560a531010fdd182e0 Mon Sep 17 00:00:00 2001 From: Tom Brien Date: Wed, 24 Mar 2021 19:51:04 +0000 Subject: [PATCH] Clarify details of sensor created by websocket_api (#17118) Co-authored-by: Franck Nijhof --- .../sensor.websocket_api.markdown | 29 ------------------- source/_integrations/websocket_api.markdown | 6 ++-- source/_redirects | 5 ++-- 3 files changed, 7 insertions(+), 33 deletions(-) delete mode 100644 source/_integrations/sensor.websocket_api.markdown diff --git a/source/_integrations/sensor.websocket_api.markdown b/source/_integrations/sensor.websocket_api.markdown deleted file mode 100644 index 770f64c1eae..00000000000 --- a/source/_integrations/sensor.websocket_api.markdown +++ /dev/null @@ -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`. diff --git a/source/_integrations/websocket_api.markdown b/source/_integrations/websocket_api.markdown index ea32434e30a..605a743f49f 100644 --- a/source/_integrations/websocket_api.markdown +++ b/source/_integrations/websocket_api.markdown @@ -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. diff --git a/source/_redirects b/source/_redirects index f4bc0b59b4a..f34de767f90 100644 --- a/source/_redirects +++ b/source/_redirects @@ -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