Skip to content

Commit

Permalink
Merge pull request #10 from noahhusby/feat/zone-events
Browse files Browse the repository at this point in the history
Add commands to zone entity
  • Loading branch information
noahhusby authored Jul 22, 2024
2 parents 3939cd4 + b4df57d commit 70b77be
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion aiorussound/rio.py
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ def status(self):
return self._get('status', 'OFF')

@property
def mute(self):
def is_mute(self):
return self._get('mute')

@property
Expand All @@ -481,6 +481,30 @@ def sleep_time_remaining(self):
def enabled(self):
return self._get('enabled')

async def mute(self):
return await self.send_event('ZoneMuteOn')

async def unmute(self):
return await self.send_event('ZoneMuteOff')

async def set_volume(self, volume):
return await self.send_event('KeyPress', 'Volume', volume)

async def volume_up(self):
return await self.send_event('KeyPress', 'VolumeUp')

async def volume_down(self):
return await self.send_event('KeyPress', 'VolumeDown')

async def zone_on(self):
return await self.send_event('ZoneOn')

async def zone_off(self):
return await self.send_event('ZoneOff')

async def select_source(self, source: int):
return await self.send_event('SelectSource', source)


class Source:
"""Uniquely identifies a Source"""
Expand Down

0 comments on commit 70b77be

Please sign in to comment.