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

Feature Request: Add Locks #49

Open
h4nsen opened this issue Jan 14, 2025 · 1 comment
Open

Feature Request: Add Locks #49

h4nsen opened this issue Jan 14, 2025 · 1 comment

Comments

@h4nsen
Copy link

h4nsen commented Jan 14, 2025

Currently it's only possible to show lock-states via homeassistant-server:entity.lock.<entity>.value.

It would be nice to have locks added as real types just as Button, Light, Switch etc. so that it would be possible to lock/unlock entities.

@h4nsen h4nsen changed the title Request to add Locks Feature Request: Add Locks Jan 14, 2025
@PanicRide
Copy link

I had to work around that by making a template switch that turns on whenever the door is unlocked, that way I can see the status of that switch on my companion surface. If you toggle the switch, it will toggle the lock state. Here's what it looks like:

switch:
  - platform: template
    switches:
      - front_door_unlocked:
          unique_id: front_door_unlocked
          friendly_name: Front Door Unlocked
          icon_template: mdi:lock
          value_template: "{{ is_state('lock.front_door_lock', 'unlocked') }}"
          turn_on:
            service: lock.unlock
            target:
              entity_id: lock.front_door_lock
          turn_off:
            service: lock.lock
            target:
              entity_id: lock.front_door_lock

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

2 participants