mitch7391 / homebridge-cmd4-AdvantageAir

Catered shell script to integrate air conditioner control units by Advantage Air into HomeKit using the plug-in homebridge-cmd4.
MIT License
38 stars 5 forks source link

[Pull Request] Streamline the code for multiple zones closing #49

Closed uswong closed 2 years ago

uswong commented 2 years ago

name: Pull Request about: Multiple simultaneous zones closing title: "Improvement to the code for multiple simultaneous zones closing to make it faster" labels: pull-request assignees: mitch7391


An improvement to the code to make multiple simultaneous zone closing a bit faster.

Is your pull request related to a problem or a new feature? Please describe: An improvement

Describe the solution you'd have implemented: If there are many zone-closing commands done within a very short period of time (<10 seconds), only one queryAirCon() will be called by the first zone-closing command, and the subsequent zone-closing commands will determine the zoneOpen from the zoneOpen.txt cache file instead of making more queryAirCon() calls. The calls to queryAirCon() will most likely fail anyway if they are done within a very short time.

Do your changes pass local testing:

Additional context: