github meshcore-dev/meshcore-ha v3.0.4

2 hours ago

Features

  • Cut over-long channel messages instead of refusing them. send_channel_message takes a new truncate option. With it set, text over the companion's byte budget is cut to fit and sent; without it, the send still fails with channel_message_too_long as in 3.0.2. The cut is made on a character boundary, so a multi-byte character is dropped whole rather than split the way the firmware's own cut does it, and meshcore_message_sent carries truncated: true when it happened. Templates whose output length varies no longer have to guarantee a length to avoid failing the automation. (#376)

Fixes

  • A direct message over the radio's limit now says so. The firmware refuses an over-long direct message rather than cutting it, and reports it as ERR_CODE_TABLE_FULL, which reads as a full contact table. send_message checks the length first and raises direct_message_too_long with the size and the limit. There is no truncate for direct messages, because the radio has no truncating behaviour to opt into. (#376)
  • The MQTT uploader stops cleanly when the entry is unloaded while a broker connect is still pending. Clients created during that connect could outlive the unload.

Notes

  • The message text entity still caps at 200 characters while the budget is a byte count around 147, so it accepts input that cannot be sent whole. Use the truncate option from an automation in the meantime. (#376)
  • Tests now also run against the current Home Assistant release, alongside the pinned test harness.
  • Validation: 466 integration tests and 373 unit tests pass, ruff clean.

Full changelog: v3.0.3...v3.0.4

Don't miss a new meshcore-ha release

NewReleases is sending notifications on new releases.