diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-13 02:43:36 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-13 02:43:36 +0200 |
commit | 52fb4f7f5561c38631e279a403cd55d8a6632955 (patch) | |
tree | 53fb6b20d43de37f44bcdf5f5763f04f5d5ff875 /ParrotZik.py | |
parent | 2dda7cdb0d159f5fd0c25766cc668ba8a4aa4c7d (diff) | |
download | pyParrotZikTCP-52fb4f7f5561c38631e279a403cd55d8a6632955.tar.xz pyParrotZikTCP-52fb4f7f5561c38631e279a403cd55d8a6632955.zip |
Add Room sound effect feature.
Diffstat (limited to '')
-rw-r--r-- | ParrotZik.py | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/ParrotZik.py b/ParrotZik.py index 0cdab71..80dc591 100644 --- a/ParrotZik.py +++ b/ParrotZik.py @@ -101,6 +101,19 @@ class BatteryStates: CHARGING: 'Charging', } +class Rooms: + CONCERT_HALL = 'concert' + JAZZ_CLUB = 'jazz' + LIVING_ROOM = 'living' + SILENT_ROOM = 'silent' + representation = { + CONCERT_HALL: 'Concert Hall', + JAZZ_CLUB: 'Jazz Club', + LIVING_ROOM: 'Living Room', + SILENT_ROOM: 'Silent Room', + } + + class ParrotZikBase(object): def __init__(self, api): @@ -206,12 +219,21 @@ class ParrotZikVersion2(ParrotZikBase): self.api.set('/api/flight_mode', arg) @property - def room_size(self): + def sound_effect(self): + data = self.api.get('/api/audio/sound_effect/enabled') + return self._result_to_bool(data.answer.audio.sound_effect['enabled']) + + @sound_effect.setter + def sound_effect(self, arg): + self.api.set('/api/audio/sound_effect/enabled', arg) + + @property + def room(self): data = self.api.get('/api/audio/sound_effect/room_size') return data.answer.audio.sound_effect['room_size'] - @room_size.setter - def room_size(self, arg): + @room.setter + def room(self, arg): self.api.set('/api/audio/sound_effect/room_size', arg) @property |