Skip to content

Fix Core Room Size encoding and decoded value round-trip #45

Description

@EdenNelson

Core Room Size commands should encode the selected area as round(m² * 10.764 * 3.15) and send {0x02, size_low, size_high}. Both payload bytes should be computed from the raw value.

Live Core400S testing showed the command payload is accepted by the MCU, but decoded status values can publish one square meter low at range edges. For example:

  • Setting 9 m² sends raw 305 (0x31 0x01) and should publish back as 9.
  • Setting 38 m² sends raw 1288 (0x08 0x05) and should publish back as 38.

The likely cause is that Core status decode computes a float from the raw value and then publishes through a path that truncates the decoded value instead of preserving or rounding it.

Acceptance criteria:

  • Core room-size raw value is computed as round(m² * 10.764 * 3.15).
  • Core Room Size payload is {0x02, size_low, size_high}.
  • Both size_low and size_high are computed from the raw value.
  • Core status room-size raw values decode with the same 3.15 factor.
  • Decoded Core room-size status publishes the nearest intended value instead of truncating down.
  • Core400S edge values round-trip:
    • 9 m² publishes back as 9, not 8.
    • 38 m² publishes back as 38, not 37.
  • No remembered Room Size persistence, fan mode mechanics, diagnostics, or unrelated model changes are included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions