I want to create an automation that runs at most once a week

{
    "name": "로청 자동화 테스트",
    "actions": [
        {
            "if": {
                "equals": {
                    "left": {
                        "device": {
                            "devices": [
                                "d782b8eb-7280-44f7-bc96-2aef4e7b273b"
                            ],
                            "component": "main",
                            "capability": "switch",
                            "attribute": "switch"
                        }
                    },
                    "right": {
                        "string": "on"
                    }
                },
                "then": [
                    {
                        "limit": {
                            "count": 1,
                            "period": "Week",
                            "actions": [
                                {
                                    "command": {
                                        "devices": [
                                            "83ab0c89-c360-41a5-8b75-b9ade7d78c5f"
                                        ],
                                        "commands": [
                                            {
                                                "component": "main",
                                                "capability": "switch",
                                                "command": "on"
                                            }
                                        ]
                                    }
                                }
                            ]
                        }
                    }
                ],
                "sequence": {
                    "then": "Parallel",
                    "else": "Parallel"
                }
            }
        }
    ]
}

I want to create a RUELS API that runs at most once a week, but it runs multiple times. What could be the problem?

Remove the “sequence” block and try it again. There’s no “else” block anyway and who knows how it’s interpreted.

Hi, @blueprint

Sorry for the delay, I was checking this with the engineering team.
The good news is that the behavior you observed was a bug, and the fix was released today.

So, just to provide more context for this property, it works with fixed time periods, not relative periods. This means that if you set the limit to 1 hour, the rule will only execute once within the current hour, for example, 15:00-16:00, which means that if you execute the rule at 15:55, by 16:01 the Rule will be able to execute again.