lumi icon indicating copy to clipboard operation
lumi copied to clipboard

lumi/audio/volume - value with quotes

Open vnkorol opened this issue 3 years ago • 2 comments

is it possible to make value with int or float type, not string with quotes?

vnkorol avatar May 09 '21 15:05 vnkorol

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);

vnkorol avatar May 09 '21 15:05 vnkorol

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

iPavel89-work avatar Oct 01 '21 09:10 iPavel89-work