Skip to content

feat: add weight update support & fix behavior sensor device conflict…#41

Merged
ajacques merged 1 commit into
tryfi:masterfrom
prestomation:feat/weight-update
Jun 29, 2026
Merged

feat: add weight update support & fix behavior sensor device conflict…#41
ajacques merged 1 commit into
tryfi:masterfrom
prestomation:feat/weight-update

Conversation

@prestomation

Copy link
Copy Markdown
Contributor

… (#1)

  • Add MUTATION_UPDATE_PET and updatePetWeight() to pytryfi query
  • Add setWeight() method to FiPet for weight updates via GraphQL
  • Replace stub async_set_native_value in number.py with working implementation that calls pet.setWeight() via async_add_executor_job and re-raises errors as HomeAssistantError for proper user feedback
  • Use public .session property instead of private ._session for API calls
  • Add tests for weight mutation, FiPet.setWeight, and number entity (success, no-pet, and API error paths)

…#1)

- Add MUTATION_UPDATE_PET and updatePetWeight() to pytryfi query
- Add setWeight() method to FiPet for weight updates via GraphQL
- Replace stub async_set_native_value in number.py with working implementation
  that calls pet.setWeight() via async_add_executor_job and re-raises errors
  as HomeAssistantError for proper user feedback
- Use public .session property instead of private ._session for API calls
- Fix PetBehaviorSensor device_info: only set identifiers so it merges with
  the main pet device instead of overriding model/name (was causing
  'Series 3+ Collar' to replace 'Smart Dog Collar' in HA 2025.2)
- Add tests for weight mutation, FiPet.setWeight, and number entity
  (success, no-pet, and API error paths)

Co-authored-by: HomeClaw <homeclaw@openclaw.ai>
@ajacques
ajacques merged commit 87623d9 into tryfi:master Jun 29, 2026
3 checks passed
@ajacques

Copy link
Copy Markdown
Contributor

Sorry about the delay in merging. Had some life stuff come up. Thank you for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants