crowbarz / aiopioneer

Pioneer AVR API (asyncio)
Apache License 2.0
8 stars 6 forks source link

Simplify update_zone logic #39

Open webmeister opened 1 week ago

webmeister commented 1 week ago

Avoid duplicate checks and loops and follow a simple structure:

  1. Update power state and skip all further updates if power is off, since those might not work anyway.
  2. Update generic properties that should always be supported.
  3. Update everything else that is supported by the respective zone, unless disabled via PARAM_DISABLE_AUTO_QUERY or PARAM_ENABLED_FUNCTIONS.
crowbarz commented 6 days ago

Thanks for the PR. It is definitely a lot cleaner. It seems ok, I have cherry-picked the PR and will soak it for a few days on my setup.