Skip to content

Commit 091c761

Browse files
authored
Watering (#21)
* refactor sensor data handling to improve pump control logic and update documentation * refactor DHT11 sensor handling in sensor_task for improved power management and efficiency * refactor sensor_task to enhance sensor data collection and hardware initialization * refactor sensor data collection in collect_all_sensor_data for improved error handling and clarity * implement Drop trait for Dht11 to ensure safe GPIO pin state on drop * remove unnecessary delay in Drop implementation for Dht11 to ensure safe GPIO pin state * update dependencies and refactor GPIO usage for improved type safety and clarity * update dependencies and enhance logging initialization for improved debugging * add state_class to sensor discovery payload for improved MQTT integration * add support for Rust 2024 edition in cargo configuration * set state_class in sensor discovery payload conditionally based on unit presence for improved Home Assistant integration * add strum dependency and refactor sensor discovery to use enum iteration for improved readability
1 parent 383f91c commit 091c761

File tree

12 files changed

+542
-364
lines changed

12 files changed

+542
-364
lines changed

.cargo/config.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ rustflags = ["-C", "link-arg=-nostartfiles"]
1010

1111
target = "xtensa-esp32s3-none-elf"
1212

13+
[cargo-new]
14+
edition = "2024"
15+
1316
[unstable]
1417
build-std = ["alloc", "core"]

0 commit comments

Comments
 (0)