Browse Source

Bluetooth audio status added

tags/v1.3.0
Dirk Alders 11 months ago
parent
commit
b728a472e7
2 changed files with 6 additions and 3 deletions
  1. 1
    1
      devdi
  2. 5
    2
      function/ground_floor_west.py

+ 1
- 1
devdi

1
-Subproject commit 0620158064ab5bbb932c2afb9f557cf0b18b37e3
1
+Subproject commit 2e66d0e27416739a8e5c1fa096490882f1b9643c

+ 5
- 2
function/ground_floor_west.py View File

127
         self.remote_amplifier = pd.get(props.STG_MYA, loc, roo, props.FUN_RCA)
127
         self.remote_amplifier = pd.get(props.STG_MYA, loc, roo, props.FUN_RCA)
128
         self.spotify_state = pd.get(props.STG_MYA, loc, roo, props.FUN_ASS)
128
         self.spotify_state = pd.get(props.STG_MYA, loc, roo, props.FUN_ASS)
129
         self.mpd_state = pd.get(props.STG_MYA, loc, roo, props.FUN_ASM)
129
         self.mpd_state = pd.get(props.STG_MYA, loc, roo, props.FUN_ASM)
130
+        self.bt_state = pd.get(props.STG_MYA, loc, roo, props.FUN_ASB)
130
         # heating function
131
         # heating function
131
         self.heating_valve = pd.get(props.STG_ZGW, loc, roo, props.FUN_HEA)
132
         self.heating_valve = pd.get(props.STG_ZGW, loc, roo, props.FUN_HEA)
132
         super().__init__(mqtt_client, pd, vd)
133
         super().__init__(mqtt_client, pd, vd)
158
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, None, self.powerplug_common.set_output_0_mcb, True)
159
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, None, self.powerplug_common.set_output_0_mcb, True)
159
         self.spotify_state.add_callback(self.spotify_state.KEY_STATE, None, self.powerplug_common.set_output_0_mcb, True)
160
         self.spotify_state.add_callback(self.spotify_state.KEY_STATE, None, self.powerplug_common.set_output_0_mcb, True)
160
         self.mpd_state.add_callback(self.mpd_state.KEY_STATE, None, self.powerplug_common.set_output_0_mcb, True)
161
         self.mpd_state.add_callback(self.mpd_state.KEY_STATE, None, self.powerplug_common.set_output_0_mcb, True)
162
+        self.bt_state.add_callback(self.bt_state.KEY_STATE, None, self.powerplug_common.set_output_0_mcb, True)
161
         # Mediaplayer - Audio source selection
163
         # Mediaplayer - Audio source selection
162
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_AMPLIFIER, True, self.audio_source_selector, True)
164
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_AMPLIFIER, True, self.audio_source_selector, True)
163
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, True, self.audio_source_selector, True)
165
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, True, self.audio_source_selector, True)
164
         self.spotify_state.add_callback(self.spotify_state.KEY_STATE, True, self.audio_source_selector, True)
166
         self.spotify_state.add_callback(self.spotify_state.KEY_STATE, True, self.audio_source_selector, True)
165
         self.mpd_state.add_callback(self.mpd_state.KEY_STATE, True, self.audio_source_selector, True)
167
         self.mpd_state.add_callback(self.mpd_state.KEY_STATE, True, self.audio_source_selector, True)
168
+        self.bt_state.add_callback(self.bt_state.KEY_STATE, True, self.audio_source_selector, True)
166
         self.audio_source = self.AUDIO_SOURCE_PC
169
         self.audio_source = self.AUDIO_SOURCE_PC
167
 
170
 
168
         # heating function
171
         # heating function
210
         )
213
         )
211
         self.audio_player_videv = videv_audio_player(
214
         self.audio_player_videv = videv_audio_player(
212
             mqtt_client, config.TOPIC_GFW_DIRK_AUDIO_PLAYER_VIDEV,
215
             mqtt_client, config.TOPIC_GFW_DIRK_AUDIO_PLAYER_VIDEV,
213
-            self.spotify_state, self.mpd_state
216
+            self.spotify_state, self.mpd_state, self.bt_state
214
         )
217
         )
215
         #
218
         #
216
         # Other stuff
219
         # Other stuff
221
         if device == self.powerplug_common and key == self.KEY_POWERPLUG_CD_PLAYER:
224
         if device == self.powerplug_common and key == self.KEY_POWERPLUG_CD_PLAYER:
222
             # switch on of cd player
225
             # switch on of cd player
223
             self.audio_source = self.AUDIO_SOURCE_CD
226
             self.audio_source = self.AUDIO_SOURCE_CD
224
-        elif device in [self.spotify_state, self.mpd_state]:
227
+        elif device in [self.spotify_state, self.mpd_state, self.bt_state]:
225
             # switch on raspi-source
228
             # switch on raspi-source
226
             self.audio_source = self.AUDIO_SOURCE_RASPI
229
             self.audio_source = self.AUDIO_SOURCE_RASPI
227
         elif device == self.powerplug_common and key == self.KEY_POWERPLUG_AMPLIFIER:
230
         elif device == self.powerplug_common and key == self.KEY_POWERPLUG_AMPLIFIER:

Loading…
Cancel
Save