bergware/dynamix

Feature Request, System Temp

Opened this issue · 0 comments

Would it be possible to change lines 39 and 40 in SystemTemp.php from

if ($val[0]!='-') $set[] = "<i class='fa fa-snowflake-o' title='Processor' style='margin:0 6px 0 12px'></i>".my_temp($val[0], $_POST['unit'], $_POST['dot']);
if ($val[1]!='-') $set[] = "<i class='fa fa-snowflake-o' title='Mainboard' style='margin:0 6px 0 12px'></i>".my_temp($val[1], $_POST['unit'], $_POST['dot']);

to

if ($val[0]!='-') $set[] = "<i class='fa fa-snowflake-o' title='Processor' style='margin:0 6px 0 12px'></i>".my_temp($val[0], $_REQUEST['unit'], $_REQUEST['dot']);
if ($val[1]!='-') $set[] = "<i class='fa fa-snowflake-o' title='Mainboard' style='margin:0 6px 0 12px'></i>".my_temp($val[1], $_REQUEST['unit'], $_REQUEST['dot']);

This will have no side effect but will allow me direct access to http://TOWER/plugins/dynamix.system.temp/include/SystemTemp.php?unit=C&dot=. so i can pull it in to Home Assistant etc. Unfortunately HA doesn't support POST on it's scrape sensor.

I already currently modify this file to do that but it would be nice to just have this change implement.