Revert "Move API checking to interval"
This reverts commit d98619b1e43cdcfb0aae059452edcb2ccd0bfc19.
This commit is contained in:
parent
d98619b1e4
commit
6f0cc86312
@ -197,27 +197,20 @@ script:
|
|||||||
interval:
|
interval:
|
||||||
- interval: 5s
|
- interval: 5s
|
||||||
then:
|
then:
|
||||||
|
- logger.log: "Checking Voice Assistant is running"
|
||||||
- if:
|
- if:
|
||||||
condition:
|
condition:
|
||||||
and:
|
and:
|
||||||
|
- api.connected:
|
||||||
|
- switch.is_on: use_wake_word
|
||||||
- not:
|
- not:
|
||||||
- api.connected:
|
- voice_assistant.is_running
|
||||||
then:
|
then:
|
||||||
- light.turn_on:
|
- logger.log: "Voice Assistant not running; restarting it"
|
||||||
id: output_led
|
|
||||||
effect: flash_white
|
|
||||||
- switch.turn_off: use_wake_word
|
|
||||||
else:
|
|
||||||
# This absolute absurdity is required to prevent
|
|
||||||
# "no wake word detected" failure loops.
|
|
||||||
- switch.turn_on: use_wake_word
|
|
||||||
- delay: 1s
|
|
||||||
- switch.turn_off: use_wake_word
|
- switch.turn_off: use_wake_word
|
||||||
- delay: 1s
|
- delay: 1s
|
||||||
- switch.turn_on: use_wake_word
|
- switch.turn_on: use_wake_word
|
||||||
- delay: 2s
|
- delay: 1s
|
||||||
- light.turn_off:
|
|
||||||
id: output_led
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: DEBUG
|
level: DEBUG
|
||||||
@ -226,6 +219,22 @@ logger:
|
|||||||
api:
|
api:
|
||||||
encryption:
|
encryption:
|
||||||
key: !secret api_encryption_key
|
key: !secret api_encryption_key
|
||||||
|
on_client_disconnected:
|
||||||
|
- light.turn_on:
|
||||||
|
id: output_led
|
||||||
|
effect: flash_white
|
||||||
|
- switch.turn_off: use_wake_word
|
||||||
|
on_client_connected:
|
||||||
|
# This absolute absurdity is required to prevent
|
||||||
|
# "no wake word detected" failure loops.
|
||||||
|
- switch.turn_on: use_wake_word
|
||||||
|
- delay: 2s
|
||||||
|
- switch.turn_off: use_wake_word
|
||||||
|
- delay: 2s
|
||||||
|
- switch.turn_on: use_wake_word
|
||||||
|
- delay: 2s
|
||||||
|
- light.turn_off:
|
||||||
|
id: output_led
|
||||||
|
|
||||||
ota:
|
ota:
|
||||||
password: !secret ota_password
|
password: !secret ota_password
|
||||||
|
Loading…
x
Reference in New Issue
Block a user