zacs / ha-gtfs-rt

Real-time transit information for Home Assistant
MIT License
69 stars 29 forks source link

Support generic auth headers #30

Closed raman325 closed 11 months ago

raman325 commented 1 year ago

Rather than adding support for each header type, the headers option lets the user specify what the header name is. I also did a little cleanup.

The only potentially breaking change is the switch from vol.Optional to vol.Exclusive. If someone used multiple keys in their config, that would now fail to set up, but because of the way the conditional logic is written, the extra key is a no-op and IMO is confusing for users, so while this is breaking, it is in my opinion cleaner

raman325 commented 1 year ago

I just noticed that there is another PR that does something similar to this one. I wouldn't have submitted this if I had seen that first, but I will say that this is less of a breaking change than that one is while still supporting additional use cases