mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +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}
|
out = {"zone2": False, "zone3": False}
|
||||||
try:
|
try:
|
||||||
_LOGGER.debug("Checking for zone 2 capability")
|
_LOGGER.debug("Checking for zone 2 capability")
|
||||||
receiver.raw("ZPWQSTN")
|
response = receiver.raw("ZPWQSTN")
|
||||||
|
if response != "ZPWN/A": # Zone 2 Available
|
||||||
out["zone2"] = True
|
out["zone2"] = True
|
||||||
|
else:
|
||||||
|
_LOGGER.debug("Zone 2 not available")
|
||||||
except ValueError as error:
|
except ValueError as error:
|
||||||
if str(error) != TIMEOUT_MESSAGE:
|
if str(error) != TIMEOUT_MESSAGE:
|
||||||
raise error
|
raise error
|
||||||
_LOGGER.debug("Zone 2 timed out, assuming no functionality")
|
_LOGGER.debug("Zone 2 timed out, assuming no functionality")
|
||||||
try:
|
try:
|
||||||
_LOGGER.debug("Checking for zone 3 capability")
|
_LOGGER.debug("Checking for zone 3 capability")
|
||||||
receiver.raw("PW3QSTN")
|
response = receiver.raw("PW3QSTN")
|
||||||
|
if response != "PW3N/A":
|
||||||
out["zone3"] = True
|
out["zone3"] = True
|
||||||
|
else:
|
||||||
|
_LOGGER.debug("Zone 3 not available")
|
||||||
except ValueError as error:
|
except ValueError as error:
|
||||||
if str(error) != TIMEOUT_MESSAGE:
|
if str(error) != TIMEOUT_MESSAGE:
|
||||||
raise error
|
raise error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user