mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Fix Zone 2 and Zone 3 detection in onkyo (#55471)
This commit is contained in:
parent
dd21bf73fc
commit
13b001cd9b
@ -145,16 +145,22 @@ def determine_zones(receiver):
|
||||
out = {"zone2": False, "zone3": False}
|
||||
try:
|
||||
_LOGGER.debug("Checking for zone 2 capability")
|
||||
receiver.raw("ZPWQSTN")
|
||||
out["zone2"] = True
|
||||
response = receiver.raw("ZPWQSTN")
|
||||
if response != "ZPWN/A": # Zone 2 Available
|
||||
out["zone2"] = True
|
||||
else:
|
||||
_LOGGER.debug("Zone 2 not available")
|
||||
except ValueError as error:
|
||||
if str(error) != TIMEOUT_MESSAGE:
|
||||
raise error
|
||||
_LOGGER.debug("Zone 2 timed out, assuming no functionality")
|
||||
try:
|
||||
_LOGGER.debug("Checking for zone 3 capability")
|
||||
receiver.raw("PW3QSTN")
|
||||
out["zone3"] = True
|
||||
response = receiver.raw("PW3QSTN")
|
||||
if response != "PW3N/A":
|
||||
out["zone3"] = True
|
||||
else:
|
||||
_LOGGER.debug("Zone 3 not available")
|
||||
except ValueError as error:
|
||||
if str(error) != TIMEOUT_MESSAGE:
|
||||
raise error
|
||||
|
Loading…
x
Reference in New Issue
Block a user