UM SHT: Updated ReadMe

This commit is contained in:
ezcGman 2022-12-15 00:41:08 +01:00
parent 2123e43490
commit 9587480e29

View File

@ -5,8 +5,7 @@ Usermod to support various SHT i2c sensors like the SHT30, SHT31, SHT35 and SHT8
* "SHT85" by Rob Tillaart, v0.2 or higher: https://github.com/RobTillaart/SHT85
## Usermod installation
1. Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one, add the buildflag `-D USERMOD_SHT` and the below library dependencies.
2. If you're not using thr SHT30 sensor, change the `-D USERMOD_SHT_TYPE_SHT30` build flag to one of these: `USERMOD_SHT_TYPE_SHT31`, `USERMOD_SHT_TYPE_SHT35` or `USERMOD_SHT_TYPE_SHT85`.
Simply copy the below block (build task) to your `platformio_override.ini` and compile WLED using this new build task. Or use an existing one, add the buildflag `-D USERMOD_SHT` and the below library dependencies.
ESP32:
```
@ -14,7 +13,6 @@ ESP32:
extends = env:esp32dev
build_flags = ${common.build_flags_esp32}
-D USERMOD_SHT
-D USERMOD_SHT_TYPE_SHT30
lib_deps = ${esp32.lib_deps}
robtillaart/SHT85@~0.3.3
```
@ -25,10 +23,8 @@ ESP8266:
extends = env:d1_mini
build_flags = ${common.build_flags_esp8266}
-D USERMOD_SHT
-D USERMOD_SHT_TYPE_SHT30
lib_deps = ${esp8266.lib_deps}
olikraus/U8g2@~2.28.8
robtillaart/SHT85@~0.2.0
robtillaart/SHT85@~0.3.3
```
## MQTT Discovery for Home Assistant
@ -37,6 +33,21 @@ If you're using Home Assistant and want to have the temperature and humidity ava
### Publishing readings via MQTT
Regardless of having MQTT discovery ticked or not, the mod will always report temperature and humidity to the WLED MQTT topic of that instance, if you have a broker configured and it's connected.
## Configuration
Navigate to the "Config" and then to the "Usermods" section. If you compiled WLED with `-D USERMOD_SHT`, you will see the config for it there:
* SHT-Type:
* What it does: Select the SHT sensor type you want to use
* Possible values: SHT30, SHT31, SHT35, SHT85
* Default: SHT30
* Unit:
* What it does: Select which unit should be used to display the temperature in the info section. Also used when sending via MQTT discovery, see below.
* Possible values: Celsius, Fahrenheit
* Default: Celsius
* Add-To-HA-MQTT-Discovery:
* What it does: Makes the temperature and humidity available via MQTT discovery, so they're automatically added to Home Assistant, because that way it's typesafe.
* Possible values: Enabled/Disabled
* Default: Disabled
## Change log
2022-12
* First implementation.