resolves issue #2

resolves https://github.com/PixnBits/SimpleHomeAutomation/issues/2
but could be further polished