amimof / huego

An extensive Philips Hue client library for Go with an emphasis on simplicity
MIT License
250 stars 36 forks source link

fix minor bug in scheduling recurring events #14

Closed martinrhoads closed 4 years ago

martinrhoads commented 4 years ago

Currently, I am unable to create a recurring schedule. It results in the following error:

panic: ERROR 6 [/schedules]: "parameter, autodelete, not available"

Based on what I am seeing for the autodelete param in the schedule docs, this perhaps is not relevant to relevant to recurring schedules and breaks the POST.

Only visible for non-recurring schedules.

I used curl to confirm this hypothesis.

I am have tested that setting omitempty on the AutoDelete field of the Schedule struct solved this issue for me.

martinrhoads commented 4 years ago

also, this project is great 👍

amimof commented 4 years ago

@martinrhoads Thanks for contributing 👏 Sorry for taking so long to get back to you. Just came back from a long parental leave. Your commits look good to me. Merging asap