Phono adaption gfw/dirk
This commit is contained in:
parent
b9fdd69a62
commit
11444a115d
@ -116,6 +116,7 @@ class ground_floor_west_dirk(room):
|
||||
AUDIO_SOURCE_CD = 1
|
||||
AUDIO_SOURCE_RASPI = 2
|
||||
AUDIO_SOURCE_BT = 3
|
||||
AUDIO_SOURCE_PHONO = 4
|
||||
|
||||
def __init__(self, mqtt_client, pd, vd):
|
||||
roo = props.ROO_DIR
|
||||
@ -181,6 +182,7 @@ class ground_floor_west_dirk(room):
|
||||
self.powerplug_common.add_callback(self.KEY_POWERPLUG_AMPLIFIER, True, self.audio_source_selector, True)
|
||||
self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, True, self.audio_source_selector, True)
|
||||
self.powerplug_common.add_callback(self.KEY_POWERPLUG_BT, True, self.audio_source_selector, True)
|
||||
self.powerplug_common.add_callback(self.KEY_POWERPLUG_PHONO, True, self.audio_source_selector, True)
|
||||
self.spotify_state.add_callback(self.spotify_state.KEY_STATE, True, self.audio_source_selector, True)
|
||||
self.mpd_state.add_callback(self.mpd_state.KEY_STATE, True, self.audio_source_selector, True)
|
||||
self.bt_state.add_callback(self.bt_state.KEY_STATE, True, self.audio_source_selector, True)
|
||||
@ -253,6 +255,9 @@ class ground_floor_west_dirk(room):
|
||||
elif device == self.powerplug_common and key == self.KEY_POWERPLUG_BT:
|
||||
# switch on of bluetooth
|
||||
self.audio_source = self.AUDIO_SOURCE_BT
|
||||
elif device == self.powerplug_common and key == self.KEY_POWERPLUG_PHONO:
|
||||
# switch on of bluetooth
|
||||
self.audio_source = self.AUDIO_SOURCE_PHONO
|
||||
elif device in [self.spotify_state, self.mpd_state, self.bt_state]:
|
||||
# switch on raspi-source
|
||||
self.audio_source = self.AUDIO_SOURCE_RASPI
|
||||
@ -268,8 +273,11 @@ class ground_floor_west_dirk(room):
|
||||
logger.info("Sending IR command to change audio source to cd")
|
||||
self.remote_amplifier.set_cd()
|
||||
elif self.audio_source == self.AUDIO_SOURCE_BT:
|
||||
logger.info("Sending IR command to change audio source to tuner")
|
||||
logger.info("Sending IR command to change audio source to bluetooth")
|
||||
self.remote_amplifier.set_line2()
|
||||
elif self.audio_source == self.AUDIO_SOURCE_PHONO:
|
||||
logger.info("Sending IR command to change audio source to phono")
|
||||
self.remote_amplifier.set_phono()
|
||||
elif self.audio_source == self.AUDIO_SOURCE_RASPI:
|
||||
logger.info("Sending IR command to change audio source to raspi")
|
||||
self.remote_amplifier.set_line1()
|
||||
|
Loading…
x
Reference in New Issue
Block a user