[Regression v4.79.0] Air conditioners display fan speed control instead of AC mode

Hi @pierre-gilles :waving_hand:

While working on Tuya air conditioner support (Tuya - Air Conditioner support - PR9 by Terdious · Pull Request #2591 · GladysAssistant/Gladys · GitHub), I encountered a regression already present in master, unrelated to Tuya.

Since PR #2541 (« Matter: Add fan clusters », released in v4.79.0), all air conditioning devices display fan speed control (Off / Low / Medium / High / Auto) instead of air conditioning mode control (Auto / Cool / Heat / Dehumidification / Ventilation).

Cause: Both AIR_CONDITIONING.MODE and FAN.MODE have the string value 'mode'. As ROW_TYPE_BY_FEATURE_TYPE in DeviceRow.jsx is indexed only by type, the FAN.MODE entry (declared later) silently overwrites AIR_CONDITIONING.MODE → any mode feature is routed to the fan component. This affects all integrations exposing an air-conditioning / mode feature, not just Tuya.

I opened an issue and a PR for the fix (category-aware routing, 1 file):

Feel free to let me know if you want me to adjust the fix approach. Thanks!

Well spotted, thanks for the fix!!

Have you tested both cases in real life to see if it worked well after this fix?

The PR looks good otherwise!

Well, yes and no ^^

I don’t yet have the use case supported by the current version of Gladys, but my test on the ongoing PR works perfectly yes on the fix before / after.
So real test yes, but on a branch not yet implemented in Gladys :wink: :sweat_smile:

Ok, that works for me!

Funny, haven’t you upgraded to Claude Opus 4.8 yet? :smiley:

Great!!

Lol, I think he’s delusional ^^ I’m even on Fable now ^^

By the way, @Fable is much less pleasant… He doesn’t talk while he codes!! Whereas I used to exchange a lot with Opus 4.8 while he was coding and at least he would answer me ^^ :sweat_smile:

Unlimited budget for you :joy:

As long as it’s effective!! I did a bit of Fable yesterday to test, but I didn’t have any major deep tasks to give it, the result was close to Claude Opus 4.8

Not quite ^^ :sweat_smile: And not even supported by the pro despite intensive use for this!
Let’s just say I’m testing Opus 4.8 for now, it just about fit the usage, barely.

Anyway, from next week, we’ll be limited to 50% of the usage allowance anyway.

Yes ^^
Indeed, for everyday to heavy tasks, Opus 4.8 is more than sufficient. From my limited use since last night, it performs a bit better on long tasks. But I’m still a long way from using it to its full potential, I think ^^

I just launched Fable 5 on the activity log topic, and at the same time I launched a Cloud Agent Cursor Auto on the same topic with the same prompt, to compare :grin:

I don’t know if Fable is good at design

I’m also interested in knowing. I have to launch it for a pro project soon ^^ Planned with Claude Design support, but if it’s good, no reason not to :sweat_smile:

Cursor Agent finished faster in any case and the result is magnificent. Fable 5 has been running for 36 minutes, can’t wait to see what it comes up with