Google Home controlling my Garage Doors via HA and ESPHOME - current state ignored

Greetings everyone… I’m still fairly new to HA, so please go easy on me… I’m plenty technical, however.
TLDR: Google Assistant disregards the current state of my garage door and just toggles it whenever I ask for it to close or open my garage.

I have a couple of ESP32 Sonoff SV’s. I mostly followed Dr Zzz’s 3rd gen garage door video
I configured it as a device class: garage in ESP yaml (see below), and it seems to work fine in HA.

One issue I’m having is that in Google Home… while it sees it come in as Device type: Garage via Home Assistant, and it knows if the garage is closed or open when I ask it verbally, “Is left garage open?”, it responds with “Left Garage is closed”, which it is. But if I then say “close LEFT garage” to Google, it says “one or more devices isn’t available, you might want to try setting them up again”. I previously had a Ewelink/CoolKit WiFi garage door controllers that were cloud enabled and connected into Google Assistant directly (I think) and/or maybe through SmartThings. I did my best at disconnecting that integration; but who knows, maybe I missed something?? I know this isn’t a Google Assistant specific forum, but do you know how I might troubleshoot that “one or more devices isn’t available” thing? I definitely see my Home Assistant’s “left garage” (and “right garage”) device in the Google Home app in my “garage” room.

Pics showing the devices in the Google Home app in Garage “room”.


Google Home app shows this on the device, which seems to indicate the current state of the door based on which button is highlighted.

My second issue, is if I tell Google via voice to “Close Garage”, which is a “room” that the left garage and right garage devices are in, then both garage doors “toggle”… if they were closed, they then open. If they were open, then they close.
If I ask google to “open garage” it will ask me for my pin for the left garage, which I have set as “device_class: garage”. My “right garage” currently does NOT have that setting, so the “PIN” is not currently asked for. But I plan to update it once I finish testing. Telling it my pin will allow the garage to open just fine. But again, it only “toggles” the state… It doesn’t seem to pay attention to whether the door is already closed or not. That is my main concern here.

My esphome yaml:

  name: left-garage
  friendly_name: Left Garage

  board: esp01_1m

# Enable logging

# Enable Home Assistant API
    key: "removed"

  password: "removed"

  ssid: !secret wifi_ssid
  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
    ssid: "Left-Garage Fallback Hotspot"
    password: "removed"


  - platform: ultrasonic
    id: ultrasonic_sensor1
    trigger_pin: GPIO05
    echo_pin: GPIO04
    name: "UltraSonic Sensor"
    update_interval: 60s
      filter_out: nan
    timeout: 9m

  - platform: gpio
    pin: GPIO12
    name: "Garage Door Open Switch"
    id: door_switch 
    internal: true
    inverted: False
  - platform: restart
    name: "garage Restart"
  - platform: template
    name: "Car"
    device_class: presence
    lambda: |-
      if (id(ultrasonic_sensor1).state < 1.5) {
        // car is in the garage
        return true;
      } else {
        // no car
        return false;

  - platform: gpio
    id: closed_stop
    internal: true
      number: GPIO14
      mode: INPUT_PULLUP
      inverted: False
    name: "closed_stop"
    device_class: garage_door
      - invert:

  - platform: template
    device_class: garage
    name: "Left Garage"
    lambda: |-
      if (id(closed_stop).state) {
        return cover::COVER_CLOSED;
      } else {
        return cover::COVER_OPEN; 
    restore_mode: NO_RESTORE
      # Turn the OPEN switch on briefly
      - switch.turn_on: door_switch
      - delay: 0.3s
      - switch.turn_off: door_switch
      - switch.turn_on: door_switch
      - delay: 0.3s
      - switch.turn_off: door_switch
      - switch.turn_on: door_switch
      - delay: 0.3s
      - switch.turn_off: door_switch
    optimistic: true

What else can I provide to help paint the picture, here?

Thank you so much!