Switch on/off on a specific date every year

Hi all,
I used to do that from IFTTT. However, IFTTT currently is not working with Smartthings. I was trying to use Rule API to do it but it seems not working. My rule is like

{
    "name": "Winter Mode Off",
    "actions": [
        {
            "if": {
                "equals": {
                    "left": {
                        "datetime": {
                            "timeZoneId": "America/Chicago",
                            "reference": "Now"
                        }
                    },
                    "right": {
                        "datetime": {
                            "timeZoneId": "America/Chicago",
                            "reference": "Noon",
                            "month": 1,
                            "day": 21,
                            "offset": {
                                "value": {
                                    "integer": -65
                                },
                                "unit": "Minute"
                            }
                        }
                    }
                },
                "then": [
                    {
                        "command": {
                            "devices": [
                                "1c7c10e5-8ce0-4d4c-945e-f1f63c3ff4be"
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "off"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}

Thank you

Try the virtual calendar from @Mariano_Colmenarejo

3 Likes

Thank you very much!

You can do it like this …

{
    "name": "ZZZZ Once per year",
    "actions": [
        {
            "every": {
                "specific": {
                    "month": 1,
                    "day": 21,
                    "reference": "Noon",
                    "offset": {
                        "value": {
                            "integer": 347
                        },
                        "unit": "Minute"
                    }
                },
                "actions": [
                    {
                        "command": {
                            "devices": [
                                "63533dfd-b464-499a-a462-62e196fa4172"
                            ],
                            "commands": [
                                {
                                    "component": "main",
                                    "capability": "switch",
                                    "command": "off"
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}
2 Likes

Sweet!! Thank you so much!