Hello, new on this forum.
i have publish a merge request to add the sht3X support. it works but measurement is not ideal even if i have taken the constructor reference for the sht3X. i support that the board has some heating dissipation that impact the sensor.
So Temp is higher of 5 Celsius Degrees And Humidity lower from around 10 (you can easily correct that on HA)
Feel free to test
here the config apply at captor level :
SCL on pin P7
SDA on pin P8 with Channel 1 , 2
Button on pin P20
LED on pin P26 with Channel 3
And here's the start script :
addEventHandler OnClick 20 startScript this runmeas 456
init:
echo "Init driver and powersave "
startDriver TuyaMCU
setChannelType 3 toggle
setChannelType 1 temperature_div10
setChannelType 2 humidity
PowerSave
again:
echo "activate SHT3X Sensor"
startDriver SHT3X
setChannel 3 1
echo "Send some measure"
delay_s 2
echo "stop SHT3X driver"
stopDriver SHT3X
setChannel 3 0
echo "wait 10min"
delay_s 600
goto again
runmeas:
// stopScript ID bExcludeSelf
// this will stop all other instances
stopScript 456 1
echo "Force measurement"
startDriver SHT3X
setChannel 3 1
delay_s 2
stopDriver SHT3X
setChannel 3 0
echo "go back to loop"
goto again;
And for the moment i don't have feedback regarding power consumption.
i will try to work optimisation (merge CHT8305 and SHT3x in Generic I2C for example)
Edit : here's the yaml example for homeassistant :
mqtt:
binary_sensor:
- unique_id: "temperature_1_state"
name: "temperature_1 0"
state_topic: "temperature_1/0/get"
availability:
- topic: "temperature_1/connected"
sensor:
- unique_id: "temperature_1_temp"
name: "temperature_1 Temperature"
state_topic: "temperature_1/1/get"
value_template: "{{ ( value | multiply(0.1) ) - 5.00 | round(2) }}"
unit_of_measurement: "°C"
- unique_id: "temperature_1_hum"
name: "temperature_1 humidité"
state_topic: "temperature_1/2/get"
value_template: "{{ (value | float) + 10.00 | round(2) }}"
unit_of_measurement: "%"