Rework the status again
This commit is contained in:
		@@ -280,10 +280,9 @@ interval:
 | 
			
		||||
          condition:
 | 
			
		||||
            and:
 | 
			
		||||
              - switch.is_on: voice_support_active
 | 
			
		||||
              - not: voice_assistant.connected
 | 
			
		||||
              - not: voice_assistant.is_active
 | 
			
		||||
          then:
 | 
			
		||||
            - logger.log: "voice assistant not running; restarting"
 | 
			
		||||
            - voice_assistant.stop:
 | 
			
		||||
            - voice_assistant.start_continuous:
 | 
			
		||||
 | 
			
		||||
# Add optional microWakeWord support (on-device wake word)
 | 
			
		||||
@@ -315,32 +314,24 @@ voice_assistant:
 | 
			
		||||
    - logger.log: "voice error"
 | 
			
		||||
    - if:
 | 
			
		||||
        condition:
 | 
			
		||||
          switch.is_on: voice_support_active
 | 
			
		||||
          and:
 | 
			
		||||
            - switch.is_on: voice_support_active
 | 
			
		||||
            - not: voice_assistant.is_active
 | 
			
		||||
        then:
 | 
			
		||||
          - voice_assistant.stop:
 | 
			
		||||
          - voice_assistant.start_continuous:
 | 
			
		||||
  on_end:
 | 
			
		||||
    - logger.log: "voice ended"
 | 
			
		||||
    - if:
 | 
			
		||||
        condition:
 | 
			
		||||
          switch.is_on: voice_support_active
 | 
			
		||||
          and:
 | 
			
		||||
            - switch.is_on: voice_support_active
 | 
			
		||||
            - not: voice_assistant.is_active
 | 
			
		||||
        then:
 | 
			
		||||
          - voice_assistant.stop:
 | 
			
		||||
          - voice_assistant.start_continuous:
 | 
			
		||||
  on_client_connected:
 | 
			
		||||
    - if:
 | 
			
		||||
        condition:
 | 
			
		||||
          switch.is_on: voice_support_active
 | 
			
		||||
        then:
 | 
			
		||||
          - voice_assistant.start_continuous:
 | 
			
		||||
    - light.turn_off:
 | 
			
		||||
        id: output_led
 | 
			
		||||
  on_client_disconnected:
 | 
			
		||||
    - if:
 | 
			
		||||
        condition:
 | 
			
		||||
          switch.is_on: voice_support_active
 | 
			
		||||
        then:
 | 
			
		||||
          - voice_assistant.stop:
 | 
			
		||||
    - light.turn_on:
 | 
			
		||||
        id: output_led
 | 
			
		||||
        effect: flash_white
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user