AlexxIT / StreamAssist

Home Assistant custom component that allows you to turn almost any camera and almost any speaker into a local voice assistant
MIT License
208 stars 19 forks source link

MIC wont stay on #33

Open janstadt opened 3 months ago

janstadt commented 3 months ago

I have 3 audio streams from Lenovo ThinkSmart (via IP Webcam app, but i've also noticed this in other apps) and the MIC will not stay on. I have an automation run if it detects the mic isnt on and toggles it, but when i restart HA its always off. I can update that automation to also be triggered by uptime, but i was wondering if this is by design or if something is wrong with the intergration? I'd love for it to be always on UNLESS i turn it off as opposed to the opposite.

janstadt commented 3 months ago

I also noticed that it turns off after i reconfigured the integration.

xvlw commented 2 months ago

While not a fix, this is the workaround that I put in place as an automation

alias: Stream Assist Mic
description: Turns on Stream Assist Mic if it is turned off
trigger:
  - platform: state
    entity_id:
      - switch.streamassist_<mic entity name>
    from: "on"
    to: "off"
  - platform: homeassistant
    event: start
condition: []
action:
  - service: switch.turn_on
    target:
      entity_id:
        - switch.streamassist_<mic entity name>
    data: {}
mode: single
janstadt commented 2 months ago

Thanks. Yeah i have one similar to that, had to add an additional trigger for when HA starts up too since the mic doesnt survive restarts.