Homey Community Forum

Snake case or camel case?

I am troubled, what is the preference used by Athom?

When I look at the app.json I am already troubled and forced to make use of both.
measure_xxx_changed triggers that update automatically are required to be in snake case, while the rest of the json is in camelcase. Why is that and when should we use camelcase and when the snake case?
I’d like for my code to be consistent, but am now rewriting things from camelcase to snake case when I want the automatic triggers to fire. (Still testing if that even works)

Javascript typically uses camelCase, JSON typically uses snake_case (but I think it “wins” only by a relatively small margin compared to other conventions).

Mixing conventions is a PITA, I have no idea why Athom chose to do that, but it does make sense to try and follow their method (where capability names, flow id’s, etc, are snake_case).