1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 21:06:19 +00:00

Fixes bug in time trigger and adds test for ex. /two

This commit is contained in:
magnusknutas
2016-01-26 20:43:29 +01:00
parent 6f1f8ffea0
commit 33b0f4d05d
3 changed files with 12 additions and 1 deletions

View File

@@ -45,7 +45,7 @@ def trigger(hass, config, action):
and not convert(seconds.lstrip('/'), int) % 60 == 0:
_LOGGER.warning('Periodic seconds should be divisible with 60'
'there will be an offset every minute')
if isinstance(minutes, str) and hours.startswith('/') \
if isinstance(hours, str) and hours.startswith('/') \
and not convert(hours.lstrip('/'), int) % 24 == 0:
_LOGGER.warning('Periodic hours should be divisible with 24'
'there will be an offset every midnight')