koktaildotcom / homey-mi-flora

Integrate Xiaomi Mi Flora Plant Sensor into Homey
MIT License
11 stars 13 forks source link

Naming of variables #8

Closed cbho closed 6 years ago

cbho commented 6 years ago

The used nomenclature for variables in the app include that the measured values are named with the prefix "measure_" - this means, that if the token "sensor" is used to compose a log message like shown in the example below, text will be "[Device name]: measure_moisture is too low ([value])".

ex-1

Although the logic in naming the variable is obvious and has many advantages, I suggest the variables for the measured values are names without the prefix (only "moisture", e.g.) in order to make composed messages more "clean" and ordinary language-like. This would also prevent the situation that a message read out would like "[Device name]: measure-underscore-moisture is too low ([value] :-)

koktaildotcom commented 6 years ago

The sensor is now the id of the capability, it should indeed get the name of the capability in the users preferred language.

koktaildotcom commented 6 years ago

The tag sensor will now contain the capability in the users preferred language.