The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
## What's Changed
* Update README.md with starscream podfile context by @bgoncal in https://github.com/home-assistant/HAKit/pull/63
* Avoid JSON cache by JSONSerialization NSString by @bgoncal in https://github.com/home-assistant/HAKit/pull/60
* Update README.md by @Nerkyator in https://github.com/home-assistant/HAKit/pull/64
* Bump HAKit 0.4.2 by @bgoncal in https://github.com/home-assistant/HAKit/pull/65
## New Contributors
* @Nerkyator made their first contribution in https://github.com/home-assistant/HAKit/pull/64
**Full Changelog**: https://github.com/home-assistant/HAKit/compare/0.4.1...0.4.2
## What's Changed
* Add "write" operation to HAConnection by @bgoncal in https://github.com/home-assistant/HAKit/pull/55
* Use StarScream branch which prevents multiple URLSession creation by @bgoncal in https://github.com/home-assistant/HAKit/pull/57
* Update changelof for 0.4.1 by @bgoncal in https://github.com/home-assistant/HAKit/pull/58
* Update podspec by @bgoncal in https://github.com/home-assistant/HAKit/pull/59
* Use starscream fork fix but pointing to version instead of branch by @bgoncal in https://github.com/home-assistant/HAKit/pull/61
* Reference version 4.0.4 since it is what Starscream kept in podspec by @bgoncal in https://github.com/home-assistant/HAKit/pull/62
**Full Changelog**: https://github.com/home-assistant/HAKit/compare/0.4...0.4.1
## What's Changed
* Add REST API support by @zacwest in https://github.com/home-assistant/HAKit/pull/39
* Add logging for REST send/receive by @zacwest in https://github.com/home-assistant/HAKit/pull/40
* Fix a few threading issues/crashes by @zacwest in https://github.com/home-assistant/HAKit/pull/41
* Enable compression in WebSocket connection by @zacwest in https://github.com/home-assistant/HAKit/pull/42
* Allow validating certificates by @zacwest in https://github.com/home-assistant/HAKit/pull/43
* Update CI and Linter by @bgoncal in https://github.com/home-assistant/HAKit/pull/50
* Add option to subscribe without populating by @bgoncal in https://github.com/home-assistant/HAKit/pull/48
* Update docs.yml by @bgoncal in https://github.com/home-assistant/HAKit/pull/52
* Replace "getStates" by more efficient entities subscription (compressed states) by @bgoncal in https://github.com/home-assistant/HAKit/pull/49
* Update changelog for v0.4 by @bgoncal in https://github.com/home-assistant/HAKit/pull/53
* Update docs.yml by @bgoncal in https://github.com/home-assistant/HAKit/pull/54
## New Contributors
* @bgoncal made their first contribution in https://github.com/home-assistant/HAKit/pull/50
**Full Changelog**: https://github.com/home-assistant/HAKit/compare/0.3...0.4
- Added: Subscriptions will now retry (when their request `shouldRetry`) when the HA config changes or components are loaded.
- Changed: `HAConnectionInfo` now has a throwing initializer. See `HAConnectionInfo.CreationError` for details.
- Added: Allow overriding `User-Agent` header in connection via `HAConnectionInfo`.
- Fixed: `Host` header now properly excludes port so we match URLSession behavior.
- Fixed: Services now load successfully for versions of HA Core prior to 2021.3 when `name` was added.
- Changed: `HAGlobal`'s `log` block now contains a log level, either `info` or `error`.
- Fixed: Failed populate requests no longer crash when a later subscription is updated.
- Fixed: The error log from a failed `HACache<T>` populate now contains more information.
- Fixed: Dates from HA which lack milliseconds no longer fail to parse.
- Added: `HACache<T>` which can send requests and subscribe to events to keep its value up-to-date.
- Added `HACachesContainer` accessible as `connection.caches` which contains built-in caches.
- Added: `connection.caches.states` which contains and keeps up-to-date all entity states.
- Added: `connection.caches.user` which contains the current user.
- Added: Optional `PromiseKit` target/subspec.
- Added: Optional `HAMockConnection` target/subspec for use in test cases.
- Added: `connectAutomatically` parameter to connection creation. This will call `connect()` when requests are sent if not connected.
- Added: `.getServices()` typed request.
- Added: `.getStates()` typed request.
- Changed: Swapped to using the custom (not URLSession) engine in Starscream to try and figure out if URLSession is causing connectivity issues.
- Changed: `attributes` and `context` on `HAEntity` are now represented by parsed types.
- Changed: Many internal cases of JSON parsing and decoding are now done off the main thread.
- Changed: Events to unknown subscriptions (that is, a logic error in the library somewhere) no longer unsubscribe as this was sending erroneously during reconnects.
- Fixed: Calling `connect()` when already connected no longer disconnects and reconnects.
- Fixed: Calling `cancel()` on a subscription more than once or on a non-retried subscription sends multiple unsubscribe requests.
- Fixed: Disconnections silently occurred due to e.g. suspension; pings are now sent regularly to make sure the connection really is active.
Initial release. Still under heavy development.