added variable safety to home controller

Signed-off-by: Pooyan Khosravi <pekhee@gmail.com>