forked from platypush/platypush
Don't fail hard if the seconds key is not in the map
This commit is contained in:
parent
d21fd64100
commit
0fe255436e
1 changed files with 1 additions and 1 deletions
|
@ -114,7 +114,7 @@ class GpioSensorMotionPwm3901Plugin(GpioSensorPlugin):
|
|||
'motion_x': x,
|
||||
'motion_y': y,
|
||||
'motion_mod': math.sqrt(x * x + y * y),
|
||||
'motion_events_per_sec': self._events_per_sec[secs],
|
||||
'motion_events_per_sec': self._events_per_sec.get(secs, 0),
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue