Convert Lock to toggle switch (Apple watch)

Hi All

I am creating a series of switches on a special HA sheet
My problem is that I keep end up pushing the unclock multiple times and end up locking the door again!

So a animated normal swith would be much better, for my apple watch using HA

But how do I convert the Lock to a switch like the others?
Same goes for the garage port (Just need a toggle switch)


Anyway to force this using the editor?

Thanks @FPro I did try this, so far I just get a switch that mimics the state of the Door
What am I missing?

# Lock to switch template
  - platform: template
    switches:
      doorlockswitch:
        value_template: "{{ is_state('lock.entre_danalock_v3_smart_lock', 'locked') }}"
        turn_on:
          service: switch.turn_on
          target:
            entity_id: switch.doorlock
        turn_off:
          service: switch.turn_off
          target:
            entity_id: switch.doorlock

Also tried the Copy switch example....
#  - platform: template
#    switches:
#      copy:
#        value_template: "{{ is_state('lock.entre_danalock_v3_smart_lock', 'locked') }}"
#        turn_on:
#          service: switch.turn_on
#          target:
#            entity_id: switch.frontdoor_lock
#        turn_off:
#          service: switch.turn_off
#          target:
#            entity_id: switch.frontdoor_lock

I don’t know how your lock integration works but I would assume that you would need the services lock.lock and lock.unlock.
What entity is switch.doorlock?

Sorry FPro I am really trying to fix this but I think I am missing how this works.
Dosent this create a “switch” for the lock, and the entity_id is my new “virtual” switch for the lock?

# Lock to switch template
  - platform: template
    switches:
      doorlock:
        value_template: "{{ is_state('lock.entre_danalock_v3_smart_lock', 'locked') }}"
        turn_on:
          service: lock.lock
          target:
            entity_id: switch.doorlock_close
        turn_off:
          service: lock.unlock
          target:
            entity_id: switch.doorlock_open

# Garage to switch template
  - platform: template
    switches:
      garageswitch:
        value_template: "{{ is_state('cover.garage_garageport', 'open') }}"
        turn_on:
          service: cover.open_cover
          target:
            entity_id: switch.garageswitch_open
        turn_off:
          service: cover.close_cover
          target:
            entity_id: switch.garageswitch_close

Again sorry I think I have been using the new UI for to long :slight_smile:

No. In the entity_id you need to specify your existing lock entity.

1 Like