lumi
lumi copied to clipboard
lumi/audio/volume - value with quotes
is it possible to make value with int or float type, not string with quotes?
it is fixing by changing gateway.js:
// Получаем состояние о громкости function getVolume() { audio.volume.value = cp.execSync("amixer get " + common.config.sound_channel + " | awk '$0~/%/{print $4}' | tr -d '[]%'").toString().split(os.EOL)[0]; mqtt.publish_value(audio.volume);
in gateway.js you should add string audio.volume.value = Number(audio.volume.value);
after string audio.volume.value = cp.execSync("amixer get " + common.config.sound_channel + " | awk '$0~/%/{print $4}' | tr -d '[]%'").toString().split(os.EOL)[0];
ang get volume become number, not string