fix: topic update

This commit is contained in:
2026-03-29 22:20:23 +02:00
parent 0596b65903
commit f762c5b586

View File

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