浏览代码

Add documentation about sensors

Oxan van Leeuwen 3 年之前
父节点
当前提交
97105684cd
共有 1 个文件被更改,包括 23 次插入3 次删除
  1. 23 3
      README.md

+ 23 - 3
README.md

@@ -1,8 +1,8 @@
 Stream server for ESPHome
 =========================
 
-Custom component for ESPHome to expose a UART stream over WiFi or Ethernet. Can be used as a serial-to-wifi bridge as
-known from ESPLink or ser2net by using ESPHome.
+Custom component for ESPHome to expose a UART stream over WiFi or Ethernet. Provides a serial-to-wifi bridge as known
+from ESPLink or ser2net, using ESPHome.
 
 This component creates a TCP server listening on port 6638 (by default), and relays all data between the connected
 clients and the serial port. It doesn't support any control sequences, telnet options or RFC 2217, just raw data.
@@ -10,7 +10,7 @@ clients and the serial port. It doesn't support any control sequences, telnet op
 Usage
 -----
 
-Requires ESPHome v1.18.0 or higher.
+Requires ESPHome v2022.3.0 or newer.
 
 ```yaml
 external_components:
@@ -30,3 +30,23 @@ stream_server:
    uart_id: uart_bus
    port: 1234
 ```
+
+Sensors
+-------
+The server provides a binary sensor that signals whether there currently is a client connected:
+
+```yaml
+binary_sensor:
+  - platform: stream_server
+    connected:
+      name: Connected
+```
+
+It also provides a numeric sensor that indicates the number of connected clients:
+
+```yaml
+sensor:
+  - platform: stream_server
+    connection_count:
+      name: Number of connections
+```