Fix bug assigning value from every_x_day input

Creating a recurring action for every x days was failing. Fixed, and added a few unit tests.