ソースを参照

Bluetooth audio status added

tags/v1.3.0
Dirk Alders 10ヶ月前
コミット
b728a472e7
2個のファイルの変更6行の追加3行の削除
  1. 1
    1
      devdi
  2. 5
    2
      function/ground_floor_west.py

+ 1
- 1
devdi

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

+ 5
- 2
function/ground_floor_west.py ファイルの表示

@@ -127,6 +127,7 @@ class ground_floor_west_dirk(room):
127 127
         self.remote_amplifier = pd.get(props.STG_MYA, loc, roo, props.FUN_RCA)
128 128
         self.spotify_state = pd.get(props.STG_MYA, loc, roo, props.FUN_ASS)
129 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 131
         # heating function
131 132
         self.heating_valve = pd.get(props.STG_ZGW, loc, roo, props.FUN_HEA)
132 133
         super().__init__(mqtt_client, pd, vd)
@@ -158,11 +159,13 @@ class ground_floor_west_dirk(room):
158 159
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, None, self.powerplug_common.set_output_0_mcb, True)
159 160
         self.spotify_state.add_callback(self.spotify_state.KEY_STATE, None, self.powerplug_common.set_output_0_mcb, True)
160 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 163
         # Mediaplayer - Audio source selection
162 164
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_AMPLIFIER, True, self.audio_source_selector, True)
163 165
         self.powerplug_common.add_callback(self.KEY_POWERPLUG_CD_PLAYER, True, self.audio_source_selector, True)
164 166
         self.spotify_state.add_callback(self.spotify_state.KEY_STATE, True, self.audio_source_selector, True)
165 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 169
         self.audio_source = self.AUDIO_SOURCE_PC
167 170
 
168 171
         # heating function
@@ -210,7 +213,7 @@ class ground_floor_west_dirk(room):
210 213
         )
211 214
         self.audio_player_videv = videv_audio_player(
212 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 219
         # Other stuff
@@ -221,7 +224,7 @@ class ground_floor_west_dirk(room):
221 224
         if device == self.powerplug_common and key == self.KEY_POWERPLUG_CD_PLAYER:
222 225
             # switch on of cd player
223 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 228
             # switch on raspi-source
226 229
             self.audio_source = self.AUDIO_SOURCE_RASPI
227 230
         elif device == self.powerplug_common and key == self.KEY_POWERPLUG_AMPLIFIER:

読み込み中…
キャンセル
保存