Files
zorruno-homeassistant/packages/byd_lock_button.yaml
T
2026-09-13 15:32:16 +12:00

25 lines
906 B
YAML

# Package: BYD Lock Button
# Purpose:
# Provides a voice-assistant-safe BYD lock control that can only issue a lock command.
# Notes:
# The icon reflects the live state of the underlying BYD lock. This button has no
# unlock action.
# Version history:
# - 1.0.0: Initial lock-only BYD button.
#
#:########################################################################################:#
# Template Button
#:########################################################################################:#
template:
- button:
- name: "BYD Lock"
unique_id: byd_lock_button
default_entity_id: button.byd_lock
availability: "{{ has_value('lock.atto_3_lock') }}"
icon: >-
{{ 'mdi:lock' if is_state('lock.atto_3_lock', 'locked') else 'mdi:lock-open' }}
press:
- action: lock.lock
target:
entity_id: lock.atto_3_lock