Repository navigation
Conversation
Backports Pyhass#149 from dev to the 1.0.x line so the Hive custom component can ship holiday mode on a stable release (HCC #222). - HiveApiAsync / HiveApi: get_holiday_mode, set_holiday_mode and cancel_holiday_mode (GET/POST/DELETE on /holiday-mode, epoch-ms start/end plus temperature). The sync API's request() now supports DELETE. - HiveHub: get_holiday_mode/set_holiday_mode/cancel_holiday_mode wrappers taking datetime start/end, matching dev's method names so the merge back into dev is straightforward. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
4 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #149 (holiday mode) from
devto the 1.0.x line, as discussed on Pyhass/Hive-Custom-Component#222. With this in a 1.0.x release, the custom component can ship holiday mode on a stable pin instead of the 2.0 beta.Change
HiveApiAsyncandHiveApi:get_holiday_mode,set_holiday_modeandcancel_holiday_mode. These send GET, POST and DELETE to the existingholiday_modeURL (/holiday-mode), withstart/endas epoch milliseconds plustemperature. They follow the error and file-mode handling of the other calls in each file.HiveApi.request()now supportsDELETE, which cancel needs.HiveHub:get_holiday_mode(),set_holiday_mode(start, end, temperature)(datetimes) andcancel_holiday_mode(), returning the parsed data /Trueon HTTP 200. The method names and behaviour matchdev, so merging this back intodevshould only need the conflicts resolved in favour ofdev.The sync
pyhiveapipackage is generated by unasync as usual. I checked that itsHiveHubmethods come out as plain functions.Testing
tests/is gitignored onmaster; I can add them if you'd like.🤖 Generated with Claude Code