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

Open/Closed entity in Homeassistant #353

Open
ba05 opened this issue Dec 29, 2024 · 4 comments
Open

Open/Closed entity in Homeassistant #353

ba05 opened this issue Dec 29, 2024 · 4 comments

Comments

@ba05
Copy link

ba05 commented Dec 29, 2024

Is it possible to add an open/closed entity in home assistant? If I click on the door button it says "Closed" or "Open" but I can't access this through an entity.

@doctorkb
Copy link

The cover entity should have that as the state...

@ba05
Copy link
Author

ba05 commented Dec 31, 2024

cover has it as a state, but this cannot directly be added to an entity card without creating a binary sensor using the close/open value.

@doctorkb
Copy link

You could use a template card. Or, if you're that set on a binary sensor, just set up a helper.

@tmason818
Copy link

I use this for a simple Open/Close toggle:
https://www.home-assistant.io/integrations/cover.template/

This is the code I added to my configuration.yaml.

#Virtual Garage Door control entity for "toggle" up/down Toggle control
cover:
  - platform: template
    covers:
      garage_door:
        device_class: garage
        friendly_name: "Virtual Garage Door Control"
        value_template: "{{ states('cover.garage_door_ratgdo_21719_door') }}"
        open_cover:
          action: cover.open_cover
          entity_id: cover.garage_door_ratgdo_21719_door
        close_cover:
          action: cover.close_cover
          entity_id: cover.garage_door_ratgdo_21719_door

You'll end up with a new entity you can add to cards:

image

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