Fixes #1434
Merge pull request #1440 from digitaldan/alarm-sensor-fix

Fixes #1434