Fix OverkizCommandParam FURTHER_NOTICE/NEXT_MODE casing regression#2181
Merged
Conversation
…2180) Same casing-regression bug class as #2093/#2096 and #2126, this time for the setDerogation params. Two OverkizCommandParam members were regressed from their snake_case API values to camelCase during the 2.0 enum regeneration: | Member | Was | Now (regressed) | |------------------|------------------|-----------------| | FURTHER_NOTICE | "further_notice" | "furtherNotice" | | NEXT_MODE | "next_mode" | "nextMode" | These are setDerogation command parameters. The real API expects the snake_case form — the server rejects camelCase with INCOMPATIBLE_VALUE ("expected ... one of [string value (further_notice, next_mode) ...]"). The reported io:/somfythermostat:DerogationTypeState value is likewise snake_case; only the state *definition* values array advertises the camelCase form, which is what the generator picked up. This breaks setDerogation for every consumer, including Home Assistant overkiz climate entities (SomfyThermostat, ValveHeatingTemperatureInterface). The generator's existing casing-clobber guard keeps regeneration idempotent: the corrected values now win the enum-name collision, so the harvested camelCase catalog values only map to the same names and are dropped.
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.
Fixes #2180.
Same casing-regression bug class as #2093/#2096 and #2126, this time for the
setDerogationparams.Problem
Two
OverkizCommandParammembers were regressed from their snake_case API values to camelCase during the 2.0 enum regeneration:FURTHER_NOTICE"further_notice""furtherNotice"NEXT_MODE"next_mode""nextMode"These are
setDerogationcommand parameters. The real API expects the snake_case form — the server rejects the camelCase value withINCOMPATIBLE_VALUE:The reported
io:DerogationTypeState/somfythermostat:DerogationTypeStatevalue is likewise snake_case (further_notice). Only the state definitionvaluesarray advertises the camelCase form, which is what the generator picked up.Impact
Breaks
setDerogationfor every consumer, including Home Assistantoverkizclimate entities (SomfyThermostat,ValveHeatingTemperatureInterface) — setting temperature/preset fails.Fix
Corrected the two values in
pyoverkiz/enums/command.py. The generator's existing casing-clobber guard keeps regeneration idempotent: the corrected values now win the enum-name collision, so the harvested camelCase catalog values only map to the same names and are dropped.Verification
further_notice/next_mode.utils/generate_enums.pyto confirm idempotency ([+0 new]params; corrected values preserved).