Skip to content

Fix thermal comfort calculations, sensor lifecycle, and Chinese localization#462

Open
blakebill wants to merge 5 commits into
dolezsa:masterfrom
blakebill:master
Open

Fix thermal comfort calculations, sensor lifecycle, and Chinese localization#462
blakebill wants to merge 5 commits into
dolezsa:masterfrom
blakebill:master

Conversation

@blakebill

@blakebill blakebill commented Jul 15, 2026

Copy link
Copy Markdown

Summary

This PR improves calculation correctness and sensor lifecycle handling, while completing the Simplified and Traditional Chinese localization.

Changes

Reliability and correctness

  • Correct the winter Scharlau formula by restoring the quadratic humidity term.
  • Mark calculated sensors unavailable when their temperature or humidity source is missing, unavailable, or invalid.
  • Handle invalid temperature conversion without leaving stale calculated values.
  • Enable all calculated sensors by default for config entries created in basic mode, while preserving advanced sensor selections.
  • Clean up state-change and polling listeners when an entry or YAML entity is unloaded.
  • Prevent per-entity names, icons, and enablement settings from mutating shared sensor descriptions.
  • Keep existing configuration entries editable when a configured source entity is temporarily missing or has been removed.

Localization

  • Complete the Simplified Chinese (zh-Hans) translation.
  • Add complete Traditional Chinese (zh-Hant) support.
  • Standardize thermal index names, temperature terminology, comfort levels, and risk labels.
  • Synchronize the Inlang language configuration with the available translation files.
  • Remove the obsolete standalone Estonian sensor translation fragment.

Tests

  • Add regression coverage for the corrected winter Scharlau boundaries.
  • Add coverage for default entity enablement, listener cleanup, unavailable sources, shared description isolation, and missing source entities in the options flow.
  • Restore collection of previously misnamed sensor tests.

Validation

  • Translation JSON files parse successfully
  • Simplified and Traditional Chinese keys match the English source
  • git diff --check passes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant