mdopp / simple-sonoff-server

Emulates the original sonoff-cloud-servers within your local network.
BSD 2-Clause "Simplified" License
144 stars 47 forks source link

error in state retrivial #14

Closed Fraifrai closed 6 years ago

Fraifrai commented 6 years ago

Hello,

using with a sonoff touch wall switch I had to modify this line in order to get status : res.status(200).send(((d.state == 'on') ? '1' : '0'));

replacing d.state by d because the getDeviceState function return just a string containing the state

mdopp commented 6 years ago

thanks! just changed it (and also one more thing, where it was also wrongly used)