Added Mute logic (that does not fix newly introduced crashes).
This commit is contained in:
@@ -120,6 +120,37 @@ globals:
|
||||
- id: mute
|
||||
type: bool
|
||||
initial_value: 'false'
|
||||
- id: muteH
|
||||
type: bool
|
||||
initial_value: 'false'
|
||||
|
||||
interval:
|
||||
- interval: 0.1sec
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- speaker.is_stopped:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- not:
|
||||
- lambda: 'return(id(muteH));'
|
||||
then:
|
||||
- output.turn_on: dac_mute
|
||||
- lambda: id(muteH) = true;
|
||||
- logger.log: "====> hardware mute"
|
||||
|
||||
- if:
|
||||
condition:
|
||||
- speaker.is_playing:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- lambda: 'return(id(muteH));'
|
||||
then:
|
||||
- output.turn_off: dac_mute
|
||||
- lambda: id(muteH) = false;
|
||||
- logger.log: "====> hardware unmute"
|
||||
|
||||
sensor:
|
||||
- platform: adc
|
||||
@@ -271,7 +302,7 @@ microphone:
|
||||
sample_rate: 16000
|
||||
i2s_din_pin: GPIO35
|
||||
bits_per_sample: 16bit
|
||||
channel: left
|
||||
channel: stereo
|
||||
adc_type: external
|
||||
|
||||
speaker:
|
||||
@@ -325,7 +356,6 @@ media_player:
|
||||
- micro_wake_word.start:
|
||||
- script.execute: update_led
|
||||
|
||||
|
||||
voice_assistant:
|
||||
id: va
|
||||
microphone: luxe_mic
|
||||
|
Reference in New Issue
Block a user