Skip to content

Commit

Permalink
Fix zone return when system powered off
Browse files Browse the repository at this point in the history
  • Loading branch information
koolsb committed Mar 13, 2018
1 parent a1bf844 commit 4a7e468
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pyblackbird/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def from_string(cls, string: str):
match_off = re.search (ZONE_PATTERN_OFF, string)
if not match_off:
return None
return ZoneStatus(0,0,*[int(m) for m in match_off.groups()],0)
return ZoneStatus(None,None,*[int(m) for m in match_off.groups()],None)
return ZoneStatus(1,*[int(m) for m in match_on.groups()])

@classmethod
def power_off(cls, zone: int):
return ZoneStatus(0,zone,0)
return ZoneStatus(None,zone,None, None)

class Blackbird(object):
"""
Expand Down

0 comments on commit 4a7e468

Please sign in to comment.