outletInuse value not gets properly set
outletInuse value not gets properly set

if power is greater than 0 the outlet in use property is set to true.
if ==0 then it is set to false.

Before this value was always set to true.  Now you can properly tell if the socket is powered and something is plugged in or not.
there is probably a better more efficient way to write the code. I just copied your function and adjusted it to look for the power value instead of the output value.
wr/homebridge-mpower