Repository navigation
Conversation
…g leading zero at x.9 - Below -9.9 °C (or °F) the value does not fit the big number with a decimal point, so show_big_number() returned early and the LCD kept the last value. Show whole degrees instead (e.g. -15). - At 100 % humidity show_small_number() returned early for the same reason. Cap the shown value at 99. - 0.9 was shown as ".9": the leading zero was only added below 9. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two new RAM-only attributes in Thermostat UI Configuration (0x0204): 0x0200 external temperature (int16, 0.01 ºC) and 0x0201 external humidity (uint16, 0.01 %). Writing them makes the LCD show these values instead of the local sensor, e.g. readings from an outdoor weather station. The device keeps reporting its own measurements. - The display refreshes right after the write. - After 30 min without a write the display falls back to the local sensor. The age is counted in the sensor timer because clock_time() wraps every ~268 s. - The values are not in the NV struct, so the saved settings layout is unchanged and nothing changes for devices that never get a write. - Comfort smiley and ºF mode use the shown values. - converters/lywsd03mmc.js exposes both as external_temperature and external_humidity. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This lets the LCD show values pushed from outside instead of the local sensor, e.g. the readings of a weather station or another sensor, while the device itself keeps reporting its own measurements.
How it works
0x0200external temperature (int16, 0.01 °C) and0x0201external humidity (uint16, 0.01 %).clock_time()wraps every ~268 s.Backward compatibility
zcl_nv_thermostatUiCfg_t, so the saved settings layout doesn't change and existing settings survive the OTA.converters/lywsd03mmc.jsgets two new settings,external_temperatureandexternal_humidity. The README documents the attributes.Testing
This has been running on a real LYWSD03MMC as a patch on top of 1.1.0 (SDK 3.6.8.6), updated over OTA from Zigbee2MQTT and fed every 10 min by a Home Assistant automation. I tested the push, the immediate refresh, and a battery change. This branch is the same change on current master. It builds with the repo Dockerfile (SDK 3.7.2.0), but I haven't flashed that exact build.
This builds on #201 because both change the humidity display line. Please merge that one first, or I can rebase this one if you'd rather take only this one.