mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2024-11-17 02:48:31 -07:00
08524953bf
* Add Environment Variable Override I need to be able to manage settings on this service via Environment Variables. I've added the ability to override anything in the settings schema with a corresponding environment variable. e.g. to override settings.serial.port you can set ZIGBEE2MQTT_SERIAL_PORT=/dev/ttyS0 to override the mqtt username you can set ZIGBEE2MQTT_MQTT_USER=testusername This new addition will not perform any action on existing installations unless the matching environment variable is set. I have tested this setting string, number, boolean, object and array values. * Adding test case for environment variables and slight modification to ensure 100% code coverage. * Adding a test to confirm that env variables will set non default values. Also realized that I was errantly applying the env variables to the defaults for testing. Understanding what this is doing more clearly I realize that should be clean. * Refactoring to 1. Remove the test variables from the schema and defaults and manually reflect the tests in the test. 2. Rename environment variable base from ZIGBEE2MQTT_ to ZIGBEE2MQTT_CONFIG_ * Small improvements * Removing the unneeded test. Co-authored-by: Koen Kanters <koenkanters94@gmail.com> |
||
---|---|---|
.. | ||
assets | ||
legacy | ||
stub | ||
availability.test.js | ||
bind.test.js | ||
bridge.test.js | ||
configure.test.js | ||
controller.test.js | ||
data.test.js | ||
externalConverters.test.js | ||
group.test.js | ||
homeassistant.test.js | ||
logger.test.js | ||
networkMap.test.js | ||
onEvent.test.js | ||
otaUpdate.test.js | ||
publish.test.js | ||
receive.test.js | ||
report.test.js | ||
settings.test.js | ||
utils.test.js |