Control a mister on an interval schedule?

Hello, @Jimc1611

One way you can achieve this automation is through the Rules API. The below JSON example describes the next workflow:

  1. If this Water Sensor’s status is dry.
  2. And if Now is between Sunset and Sunrise.
  3. Then Turn On Spray Device for 90 Seconds and Turn it off
{
    "name": "Spray - From Sunset to Sunrise - Spray Timer: 90s",
    "actions": [
        {
            "if": {
                "and": [
                    {
                        "equals": {
                            "left": {
                                "device": [ "waterSensorId" ],
                                "component": "main",
                                "capability": "waterSensor",
                                "attribute": "water"
                            }
                        },
                        "right": {
                            "string": "dry"
                        }
                    },
                    {
                        "between": {
                            "value": {
                                "time": {
                                    "reference": "Now"
                                }
                            },
                            "start": {
                                "time": {
                                    "reference": "Sunset"
                                }
                            },
                            "end": {
                                "time": {
                                    "reference": "Sunrise"
                                }
                            }
                        }
                    }
                ],
                "then": [
                    {
                        "command": {
                            "devices": [ "sprayDeviceId" ],
                            "commands": {
                                "component": "main",
                                "capability": "switch",
                                "command": "on", 
                                "arguments": []
                            }
                        }
                    },
                    {
                        "sleep": {
                            "duration": {
                                "value": {
                                    "integer": 90
                                },
                                "unit": "Second"
                            }
                        }
                    },
                    {
                        "command": {
                            "devices": [ "sprayDeviceId" ],
                            "commands": {
                                "component": "main",
                                "capability": "switch", 
                                "command": "off",
                                "arguments": []
                            }
                        }
                    }
                ],
                "else": []
            }
        }
    ]
}

For more information about the Rules API, go to: