Commit 8855c30
Release v1.5.0 (#41)
* Release v1.4.2: End-to-end release pipeline validation
- Test consolidated auto-release.yml workflow functionality
- Validate VERSION detection and changelog extraction fixes
- Confirm complete tag → release automation works properly
- Verify v1.4.1 pipeline issues have been resolved
* Chore/update dependencies (#26)
* Release v1.4.2: End-to-end release pipeline validation (#22)
- Test consolidated auto-release.yml workflow functionality
- Validate VERSION detection and changelog extraction fixes
- Confirm complete tag → release automation works properly
- Verify v1.4.1 pipeline issues have been resolved
Co-authored-by: Brian McFarlane <bmcfarlane@dataminr.com>
* fix: grant permissions for dependency workflow (#24)
* chore: update dependencies
---------
Co-authored-by: Brian McFarlane <bmcfarlane@dataminr.com>
Co-authored-by: samspade21 <samspade21@users.noreply.github.com>
* Enhance Vacasa API resiliency and add rich sensors (#25)
* refactor: streamline vacasa sensor setup (#27)
* Refactor blocking IO helpers (#28)
* Throttle API-backed Vacasa sensors to coordinator interval (#33)
* feat(sensor): Add VacasaNextStaySensor with API throttling (#32)
Implements next_stay sensor with comprehensive reservation attributes:
- Displays next upcoming or current reservation
- Provides detailed attributes: checkin/checkout dates, stay type, guest info
- Computes days_until_checkin, days_until_checkout, stay_duration_nights
- Supports guest, owner, maintenance, and block stay classifications
- Human-readable state with contextual messages
Changes:
- Added SENSOR_NEXT_STAY constant to const.py
- Added VacasaNextStaySensor class using VacasaApiUpdateMixin pattern
- Integrated sensor into UNIT_SENSOR_CLASSES tuple
- Adopts API throttling pattern from PR #33 for coordinator-synced updates
Conflict resolution:
- Resolved merge conflict in sensor.py from PR #33
- Refactored to use VacasaApiUpdateMixin for proper API throttling
- Changed async_update() to _async_update_from_api() pattern
* Use coordinator updates for statement sensor
* Fix token handling access and clean cache imports (#35)
* fix: keep occupancy sensor aligned with reservations (#37)
* refactor: Remove stay_type_mapping and API version configuration options
Simplifies integration configuration by removing custom stay type mapping and API version selection:
Removed Configuration:
- CONF_API_VERSION and CONF_STAY_TYPE_MAPPING constants
- DEFAULT_STAY_TYPE_MAP constant (redundant)
- API version and stay type mapping parameters from VacasaApiClient
- stay_type_mapping logic from categorize_reservation (now uses direct checks)
- API version and stay type mapping UI fields from config flow
Kept Functionality:
- Stay type constants (STAY_TYPE_GUEST, etc.) for categorization
- STAY_TYPE_TO_CATEGORY and STAY_TYPE_TO_NAME mappings for internal use
- API version fallback logic in api_client._request()
- Automatic stay type detection based on reservation attributes
Reasoning:
- Simplifies user configuration (fewer options to manage)
- Stay types are automatically detected from Vacasa API responses
- API version fallback provides automatic resilience
- Reduces maintenance burden of custom mapping configurations
Files Modified:
- const.py: Removed config constants and DEFAULT_STAY_TYPE_MAP
- api_client.py: Removed stay_type_mapping parameter and simplified categorization
- __init__.py: Removed configuration reading for removed options
- config_flow.py: Removed UI fields for API version and stay type mapping
* fix: Handle charset in API content-type header for JSON parsing
The Vacasa API recently started including charset in content-type headers
(e.g., 'application/json; charset=utf-8' instead of 'application/json').
The exact equality check in _request() was failing, causing the method to
return unparsed text strings instead of JSON dictionaries.
This caused 'string indices must be integers' errors at line 947 and other
locations where code expected dictionary responses like data['data'].
Changes:
- Always attempt JSON parsing when return_json=True regardless of content-type
- Catch both aiohttp.ContentTypeError and json.JSONDecodeError exceptions
- Add diagnostic logging with URL, content-type, error, and response preview
- Fall back to returning text if JSON parsing fails (preserves existing behavior)
Fixes critical integration failure preventing all Vacasa sensors, binary
sensors, and calendars from loading.
Resolves: #36
* debug: Add diagnostic logging for VacasaNextStaySensor troubleshooting
* fix: Critical bug fixes for entity registration, JSON parsing, and imports
- fix(cached_data): Add missing random import
* Required by RetryWithBackoff.calculate_delay() for jitter calculation
* Prevents runtime NameError when retry logic is triggered
- fix(api_client): Handle charset in API content-type headers for JSON parsing
* API may return 'application/json; charset=utf-8' instead of plain 'application/json'
* Added fallback JSON parsing with diagnostic logging for troubleshooting
* Prevents ContentTypeError when parsing valid JSON responses
- fix(sensor): Prevent premature state write before entity registration
* Added entity_id check before calling async_write_ha_state()
* Ensures entities are fully registered before state updates
* Fixes AttributeError when sensors refresh during initialization
All fixes tested and verified to resolve production issues.
* style: Fix linting errors for CI/CD compliance
- Fix E402: Move imports to top of file in api_client.py
- Fix E501: Break long lines to comply with 100 char limit
- Fix D107/D102: Add missing docstrings to class methods
- Improve code formatting and readability
Resolves pre-commit hook failures in GitHub Actions.
* Handle all candidate calendar entity IDs during recovery (#40)
* chore: prepare release v1.5.0
* fix: Resolve linting failures for PR #41
- Add missing newline at end of .env.example file
- Fix line length violations in api_client.py (lines 354, 361, 367)
- Fix line length violations in sensor.py (lines 909, 920, 1110, 1124)
All changes break long lines and comments to comply with 100-character limit.
Addresses GitHub Actions pre-commit check failures.
* fix: Use pre-commit-config-ci.yaml for CI checks
The CI workflow was using the local .pre-commit-config.yaml which has
auto-fix enabled. This caused ruff-format to modify files during CI,
making the checks fail.
Changed to use .pre-commit-config-ci.yaml which has check-only mode
for ruff-format, matching the intended CI behavior.
* fix: Apply ruff formatting to sensor.py
Removed unnecessary else clause after return statements in native_value property.
This fixes the ruff-format pre-commit check that was failing in CI.
---------
Co-authored-by: Brian McFarlane <bmcfarlane@dataminr.com>
Co-authored-by: samspade21 <samspade21@users.noreply.github.com>1 parent 42ba619 commit 8855c30
File tree
11 files changed
+102
-83
lines changed- .github/workflows
- custom_components/vacasa
- tests
11 files changed
+102
-83
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
8 | 48 | | |
9 | 49 | | |
10 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
27 | | - | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
203 | | - | |
204 | | - | |
| 202 | + | |
205 | 203 | | |
206 | 204 | | |
207 | 205 | | |
| |||
211 | 209 | | |
212 | 210 | | |
213 | 211 | | |
214 | | - | |
| 212 | + | |
215 | 213 | | |
216 | 214 | | |
217 | 215 | | |
| |||
226 | 224 | | |
227 | 225 | | |
228 | 226 | | |
229 | | - | |
230 | | - | |
| 227 | + | |
231 | 228 | | |
232 | 229 | | |
233 | 230 | | |
| |||
287 | 284 | | |
288 | 285 | | |
289 | 286 | | |
290 | | - | |
291 | 287 | | |
292 | 288 | | |
293 | 289 | | |
| |||
333 | 329 | | |
334 | 330 | | |
335 | 331 | | |
336 | | - | |
337 | 332 | | |
338 | 333 | | |
339 | 334 | | |
| |||
353 | 348 | | |
354 | 349 | | |
355 | 350 | | |
356 | | - | |
| 351 | + | |
| 352 | + | |
357 | 353 | | |
358 | 354 | | |
359 | 355 | | |
360 | 356 | | |
361 | 357 | | |
362 | 358 | | |
363 | | - | |
| 359 | + | |
364 | 360 | | |
365 | 361 | | |
366 | 362 | | |
367 | 363 | | |
368 | 364 | | |
369 | | - | |
| 365 | + | |
| 366 | + | |
370 | 367 | | |
371 | 368 | | |
372 | 369 | | |
373 | 370 | | |
374 | | - | |
375 | | - | |
376 | | - | |
| 371 | + | |
377 | 372 | | |
378 | 373 | | |
379 | 374 | | |
| |||
1116 | 1111 | | |
1117 | 1112 | | |
1118 | 1113 | | |
1119 | | - | |
1120 | 1114 | | |
1121 | 1115 | | |
1122 | 1116 | | |
| |||
1131 | 1125 | | |
1132 | 1126 | | |
1133 | 1127 | | |
1134 | | - | |
1135 | 1128 | | |
1136 | 1129 | | |
1137 | 1130 | | |
| |||
1153 | 1146 | | |
1154 | 1147 | | |
1155 | 1148 | | |
1156 | | - | |
1157 | 1149 | | |
1158 | 1150 | | |
1159 | 1151 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | | - | |
341 | | - | |
| 339 | + | |
342 | 340 | | |
343 | 341 | | |
344 | 342 | | |
| |||
355 | 353 | | |
356 | 354 | | |
357 | 355 | | |
358 | | - | |
359 | | - | |
360 | | - | |
| 356 | + | |
361 | 357 | | |
362 | 358 | | |
363 | 359 | | |
| |||
372 | 368 | | |
373 | 369 | | |
374 | 370 | | |
375 | | - | |
376 | | - | |
377 | | - | |
378 | | - | |
| 371 | + | |
| 372 | + | |
379 | 373 | | |
380 | 374 | | |
381 | 375 | | |
| |||
598 | 592 | | |
599 | 593 | | |
600 | 594 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
609 | | - | |
610 | | - | |
| 595 | + | |
| 596 | + | |
611 | 597 | | |
612 | 598 | | |
613 | 599 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
155 | 154 | | |
156 | 155 | | |
157 | 156 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
0 commit comments