Skip to content

Add missing f-prefixes to write error messages - #1038

Open
it-rec wants to merge 1 commit into
WillCodeForCats:mainfrom
it-rec:fix/write-error-messages
Open

Add missing f-prefixes to write error messages#1038
it-rec wants to merge 1 commit into
WillCodeForCats:mainfrom
it-rec:fix/write-error-messages

Conversation

@it-rec

@it-rec it-rec commented Aug 16, 2026

Copy link
Copy Markdown

Proposed change

Four error messages in the write path are missing their f prefix, so the placeholder is
logged literally:

No response from inverter ID {self._wr_unit}.

instead of the actual device ID. The messages are the ones a user sees when a write
fails, so they are exactly the ones that need to name the device.

No logic change, only the four strings.

Testing

Not triggered on my system - my writes are intentionally disabled, so I have not produced
one of these errors on real hardware. The change is a literal string fix that is visible
by reading it: without the prefix Python emits the braces verbatim.

I would rather say that plainly than claim a test I did not run.

Checklist

  • Based on the latest upstream main.
  • One subject only.
  • Tested against real hardware - see above, string-only change.

Four HomeAssistantError messages in write_registers() interpolated
nothing and showed the literal text {self._wr_unit} in the UI when a
number/select/switch write failed.
@it-rec
it-rec force-pushed the fix/write-error-messages branch from 676e2e0 to 9b14338 Compare August 17, 2026 05:04
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