fix: topic update
This commit is contained in:
13
README.md
13
README.md
@@ -32,6 +32,7 @@ An automatic server fan controller built on the ESP32-C3, featuring temperature-
|
||||
| `GND` | DHT22 GND, OLED GND, Relay GND |
|
||||
|
||||
Relay wiring:
|
||||
|
||||
- **COM** → USB 5V
|
||||
- **NO** → Fan + (red wire)
|
||||
- Fan − (black wire) → GND
|
||||
@@ -61,9 +62,9 @@ Edit these defines in `fan_controller.ino`:
|
||||
|
||||
| Topic | Direction | Payload |
|
||||
|---|---|---|
|
||||
| `esp32c3/temperature` | Publish | `23.5` (°C) |
|
||||
| `esp32c3/humidity` | Publish | `41` (%) |
|
||||
| `esp32c3/fan/state` | Publish | `ON` / `OFF` |
|
||||
| `esp32c3_fan/temperature` | Publish | `23.5` (°C) |
|
||||
| `esp32c3_fan/humidity` | Publish | `41` (%) |
|
||||
| `esp32c3_fan/fan/state` | Publish | `ON` / `OFF` |
|
||||
|
||||
## Home Assistant Setup
|
||||
|
||||
@@ -74,20 +75,20 @@ mqtt:
|
||||
sensor:
|
||||
- name: "Room Temperature"
|
||||
unique_id: "esp32c3_temperature"
|
||||
state_topic: "esp32c3/temperature"
|
||||
state_topic: "esp32c3_fan/temperature"
|
||||
unit_of_measurement: "°C"
|
||||
device_class: temperature
|
||||
|
||||
- name: "Room Humidity"
|
||||
unique_id: "esp32c3_humidity"
|
||||
state_topic: "esp32c3/humidity"
|
||||
state_topic: "esp32c3_fan/humidity"
|
||||
unit_of_measurement: "%"
|
||||
device_class: humidity
|
||||
|
||||
binary_sensor:
|
||||
- name: "Server Fan"
|
||||
unique_id: "esp32c3_fan"
|
||||
state_topic: "esp32c3/fan/state"
|
||||
state_topic: "esp32c3_fan/fan/state"
|
||||
payload_on: "ON"
|
||||
payload_off: "OFF"
|
||||
device_class: running
|
||||
|
||||
Reference in New Issue
Block a user