Automations and combining starting at sunet and ending at a certain time

Hi, @chrisrose98

With the Rules API you can create flexible and customizable automations. Please, check the example at this post, which describes the following workflow:

  • If Now is between Sunset and Sunrise,
  • Then Turn On the switch device.

For your use-case, the Rule should be modified as following:

...
                },
                "end": {
                	"time": {
                    	"timeZoneId": "{{yourZoneId}}",
                		"reference": "Sunrise",
                        "offset": {
                            "value": "270",      <-- 270 Minutes after Sunrise
                            "unit": "Minute"
                        }
                    }
                }
            },
            "then": [
                {
                    "command": {
                        "devices": [
                            "{{yourDeviceId}}"
                        ],
                        "commands": [
                            {
                                "component": "main",
                                "capability": "switch",
                                "command": "on",
                                "arguments": []
                            }
                        ]
                    }
                }
            ]
        }
    }
]

Also, you can find instructions on how to install your Rule at this thread.