Revert "Fix restarting and starting voice_assistant"
This reverts commit 09e76eb8d0ee4e97d1a3cdf12302ab0cb3c1b2ed.
This commit is contained in:
parent
6f0cc86312
commit
b6a61edcf4
@ -195,22 +195,20 @@ script:
|
||||
}
|
||||
|
||||
interval:
|
||||
- interval: 5s
|
||||
- interval: 1s
|
||||
then:
|
||||
- logger.log: "Checking Voice Assistant is running"
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- api.connected:
|
||||
- switch.is_on: use_wake_word
|
||||
- not:
|
||||
- voice_assistant.is_running
|
||||
api.connected:
|
||||
then:
|
||||
- logger.log: "Voice Assistant not running; restarting it"
|
||||
- switch.turn_off: use_wake_word
|
||||
- delay: 1s
|
||||
- switch.turn_on: use_wake_word
|
||||
- delay: 1s
|
||||
- if:
|
||||
condition:
|
||||
and:
|
||||
- switch.is_on: use_wake_word
|
||||
- not:
|
||||
- voice_assistant.is_running
|
||||
then:
|
||||
- voice_assistant.start_continuous:
|
||||
|
||||
logger:
|
||||
level: DEBUG
|
||||
@ -647,7 +645,12 @@ switch:
|
||||
entity_category: config
|
||||
on_turn_on:
|
||||
- lambda: id(assist).set_use_wake_word(true);
|
||||
- voice_assistant.start_continuous
|
||||
- if:
|
||||
condition:
|
||||
not:
|
||||
- voice_assistant.is_running
|
||||
then:
|
||||
- voice_assistant.start_continuous
|
||||
on_turn_off:
|
||||
- voice_assistant.stop
|
||||
- lambda: id(assist).set_use_wake_word(false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user