pvvx / ATC_MiThermometer

Custom firmware for the Xiaomi Thermometers and Telink Flasher
https://github.com/pvvx/pvvx.github.io/tree/master/ATC_MiThermometer
Other
2.75k stars 196 forks source link

MJWSD05MMC ESPHome #400

Closed V-VoRteX-V closed 6 months ago

V-VoRteX-V commented 8 months ago

How to display temperature from HA sensor? With LYWSD03MMC everything is fine using commands it.print_bignum or it.print_smallnum https://esphome.io/components/display/pvvx_mithermometer.html But MJWSD05MMC works strangely, it displays incorrectly

pvvx commented 8 months ago

MJWSD05MMC uses a different format and displays only 1 number. https://github.com/pvvx/ATC_MiThermometer/blob/master/src/app.h#L132

TelinkMiFlasher.html:

image

number: -999.50..19999.50, in 0.01: -99950..1999950

 *  -999    (-9.99) [ -999][ -9.99]
 *   -99    (-0.99) [ -99 ][ -0.99]
 *    -9    (-0.09) [  -9 ][ -0.09]
 *     9    (0.09)  [   9 ][  0.09]
 *    99    (0.09)  [  99 ][  0.99]
 *   999    (9.99)  [ 999 ][  9.99]
 *  9999    (99.99) [ 9999][ 99.99]
 * 19999    (199.99)[19999][199.99] 

https://esphome.io/components/display/pvvx_mithermometer.html - this only works for Xiaomi LYWSD03MMC

V-VoRteX-V commented 8 months ago

Thanks for the number format, I'll convert the values. But then how to correctly transfer the number to MJWSD05MMC from Home Assistant?