Skip to content

fix(#182): persist manual_feed_quantity across HA restarts - #248

Open
dennismdejong wants to merge 1 commit into
jjjonesjr33:devfrom
dennismdejong:fix/upstream-182
Open

fix(#182): persist manual_feed_quantity across HA restarts#248
dennismdejong wants to merge 1 commit into
jjjonesjr33:devfrom
dennismdejong:fix/upstream-182

Conversation

@dennismdejong

Copy link
Copy Markdown

Fixes #182

Problem: Users set manual_feed_quantity on their feeder, but after HA restart it resets to 1 because the value was only stored in-memory (_manual_feed_quantity instance variable).

Fix: Added HA's RestoreEntity mixin to PetLibroNumberEntity. On startup, async_added_to_hass restores the last known manual_feed_quantity value from HA's state machine, correctly reversing the unit conversion and clamping to the valid range [1, max_feed_portions].

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.

[Bug]: Feed quantity gets reset after HA

1 participant