Im working on a new app that schedules On times for multiple switches. But only one schedule is getting stored. Can I not use same Handler? Here's a snippet of this part of code:
You need to add a 3rd arg in the schedule call, which is your options map, with [overwrite: false], as mentioned here: Common Methods | Hubitat Documentation. The default is overwrite: true, which cancels the existing schedule and creates a new one with the specified cron string
The data option, passed in the same 3rd arg map, specifies a map arg which is provided to the scheduled method when it is called. You can then use the key/value pairs from that map within your function. E.g.: