Hi, there is the WindowOrDoorOpen smartapp at my github that can fulfill this use case.
However, instead of shutting down your ecobee (or Nest), I’d recommend setting it to away as turning off the tstat may be an issue in coldest parts of the USA/Canada in the winter (pipe bursting) or cause mold in the summer (due to excessive humidity). Don’t forget that ecobee/smartThings may be subject to outages from time to time…
https://github.com/yracine/MyEcobeeDevice.src/tree/master/smartapps
P.S. The smartapp works with any thermostat connected to SmartThings, but I’d recommend using MyEcobee device as my ecobee implementation offers more features and has been migrated to the custom capabilities which make the device more functional under the new Samsung connect app.