Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Voice code not working with exposed HA Voice Assistant cover #87

Open
amaisano opened this issue Nov 4, 2023 · 3 comments
Open

Voice code not working with exposed HA Voice Assistant cover #87

amaisano opened this issue Nov 4, 2023 · 3 comments

Comments

@amaisano
Copy link

amaisano commented Nov 4, 2023

When I used the MyQ HA integration to expose the cover entity to Alexa, I would be asked every time by my Echo devices to say the 4 digit voice code to open the garage. The first time I asked this Alexa asked me to set the code.

Through Ratgdo Esphome, Alexa ALSO asked me to set a voice code the first time I exposed the cover, but it never asks for the code via Esphome, so anyone can voice open the garage without a voice code.

Can we get the voice code working with this integration?

@dermm
Copy link

dermm commented Nov 21, 2023

Hi,

I have made exactly the same observation.
It is probably because it contains partial opening.
I mean the option "supported_features" is set to 15 to allow set position and Stop.

https://github.com/home-assistant/core/blob/dev/homeassistant/components/cover/__init__.py

These SUPPORT_* constants are deprecated as of Home Assistant 2022.5.

Please use the CoverEntityFeature enum instead.

SUPPORT_OPEN = 1
SUPPORT_CLOSE = 2
SUPPORT_SET_POSITION = 4
SUPPORT_STOP = 8
SUPPORT_OPEN_TILT = 16
SUPPORT_CLOSE_TILT = 32
SUPPORT_STOP_TILT = 64
SUPPORT_SET_TILT_POSITION = 128

@amaisano
Copy link
Author

So is this something we can adjust?

I also noticed the close command no longer beeps the garage and flashes the lights as a warning. It just instantly closes.

@doctorkb
Copy link

doctorkb commented Feb 7, 2024

So is this something we can adjust?

I worked around it by making a separate "shadow" cover in HA's configuration.yaml. I added:

cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Garage Door"
        unique_id: "garage_door_template"
        value_template: "{{ states('cover.ratgdov25i_id_door') }}"
        open_cover:
          service: cover.open_cover
          data:
            entity_id: cover.ratgdov25i_id_door
        close_cover:
          service: cover.close_cover
          data:
            entity_id: cover.ratgdov25i_id_door
        icon_template: >-
          {% if is_state('cover.ratgdov25i_id_door', 'open') %}
            mdi:garage-open
          {% else %}
            mdi:garage
          {% endif %}

Of course, you'll need to update the four mentions of the ratgdo entity.

Once you've added this and reloaded your YAML, expose it to Alexa instead of the ratgdo entity and the voice code requirement is available and functional.

I also noticed the close command no longer beeps the garage and flashes the lights as a warning. It just instantly closes.

This is known and could be considered a feature rather than a bug. I understood there was some work being done on the "Time To Close" function that would allow for that feature capability. More discussion here: #42 and #43 and #60

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants