Skip to content

Read colors_flower from the right JSON key#93

Merged
emericg merged 1 commit into
emericg:masterfrom
bterrier:colors_flower
May 25, 2026
Merged

Read colors_flower from the right JSON key#93
emericg merged 1 commit into
emericg:masterfrom
bterrier:colors_flower

Conversation

@bterrier

Copy link
Copy Markdown
Contributor

The 'colors_flower' branch in Plant::read_json_watchflower checked
'colors_flower' but then read the array from 'flower_bract', a key
that doesn't exist (copy-paste from the adjacent colors_bract block).
toArray() on a missing value returns an empty array, so flower colors
were silently dropped on every plant cache round-trip via
DevicePlantSensor::setPlantName / loadPlant.

The 'colors_flower' branch in Plant::read_json_watchflower checked
'colors_flower' but then read the array from 'flower_bract', a key
that doesn't exist (copy-paste from the adjacent colors_bract block).
toArray() on a missing value returns an empty array, so flower colors
were silently dropped on every plant cache round-trip via
DevicePlantSensor::setPlantName / loadPlant.
@emericg emericg merged commit ecbfbbb into emericg:master May 25, 2026
4 of 5 checks passed
@emericg

emericg commented May 25, 2026

Copy link
Copy Markdown
Owner

Yes thank you!

@bterrier bterrier deleted the colors_flower branch May 31, 2026 13:56
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.

2 participants