Add in some sort of state tracking so api know what the device is currently doing. eg. is the light currently on? if so don't try to turn it on again. This may need something like Redis or Database models.
Add in some sort of state tracking so api know what the device is currently doing.
eg. is the light currently on? if so don't try to turn it on again.
This may need something like Redis or Database models.