-{"id":"lock.template","name":"Template Lock","description":"The `template` lock platform allows you to create simple locks out of just actions and an optional value lambda. Once defined, it will automatically appear in Home Assistant as a lock and can be controlled through the frontend.","category":"lock","docs_url":"https://esphome.io/components/lock/template","image_url":"https://esphome.io/images/description.svg","provides":["template_"],"config_entries":[{"key":"name","type":"string","label":"Name","description":"The name of the lock. At least one of **id** and **name** must be specified.","display_format":null,"help_link":"https://esphome.io/components/lock#base-lock-configuration"},{"key":"icon","type":"icon","label":"Icon","description":"Manually set the icon to use for the lock in the frontend.","display_format":null,"help_link":"https://esphome.io/components/lock#base-lock-configuration"},{"key":"id","type":"id","label":"ID","description":"Manually specify the ID for code generation. At least one of **id** and **name** must be specified.","advanced":true,"help_link":"https://esphome.io/components/lock#base-lock-configuration"},{"key":"assumed_state","type":"boolean","label":"Assumed State","description":"Whether the true state of the lock is not known. This will make the Home Assistant frontend show buttons for both LOCK and UNLOCK actions, instead of hiding one of them when the lock is LOCKED/UNLOCKED. Defaults to `false`.","default_value":false,"display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock/template#configuration-variables"},{"key":"availability","type":"nested","label":"Availability","display_format":null,"depends_on_component":"mqtt","advanced":true,"config_entries":[{"key":"topic","type":"string","label":"Topic","required":true,"display_format":null,"advanced":true},{"key":"payload_available","type":"string","label":"Payload Available","default_value":"online","display_format":null,"advanced":true},{"key":"payload_not_available","type":"string","label":"Payload Not Available","default_value":"offline","display_format":null,"advanced":true}]},{"key":"command_retain","type":"boolean","label":"Command Retain","display_format":null,"advanced":true},{"key":"command_topic","type":"string","label":"Command Topic","display_format":null,"templatable":true,"depends_on_component":"mqtt","advanced":true},{"key":"device_id","type":"id","label":"Device ID","display_format":null,"advanced":true},{"key":"disabled_by_default","type":"boolean","label":"Disabled By Default","description":"If true, then this entity should not be added to any client's frontend, (usually Home Assistant) without the user manually enabling it (via the Home Assistant UI). Defaults to `false`.","display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock#base-lock-configuration"},{"key":"discovery","type":"boolean","label":"Discovery","display_format":null,"depends_on_component":"mqtt","advanced":true},{"key":"entity_category","type":"string","label":"Entity Category","description":"The category of the entity. See [https://developers.home-assistant.io/docs/core/entity/#generic-properties](https://developers.home-assistant.io/docs/core/entity/#generic-properties) for a list of available options. Set to `\"\"` to remove the default entity category.","display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock#base-lock-configuration"},{"key":"internal","type":"boolean","label":"Internal","description":"Mark this component as internal. Internal components will not be exposed to the frontend (like Home Assistant). Only specifying an `id` without a `name` will implicitly set this to true.","display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock#base-lock-configuration"},{"key":"lambda","type":"lambda","label":"Lambda","description":"Lambda to be evaluated repeatedly to get the current state of the lock.","display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock/template#configuration-variables"},{"key":"lock_action","type":"trigger","label":"Lock Action","description":"The action that should be performed when the remote (like Home Assistant's frontend) requests the lock to be locked.","display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock/template#configuration-variables"},{"key":"open_action","type":"trigger","label":"Open Action","display_format":null,"advanced":true},{"key":"optimistic","type":"boolean","label":"Optimistic","description":"Whether to operate in optimistic mode - when in this mode, any command sent to the template lock will immediately update the reported state. Defaults to `false`.","default_value":false,"display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock/template#configuration-variables"},{"key":"qos","type":"string","label":"QOS","display_format":null,"depends_on_component":"mqtt","advanced":true},{"key":"retain","type":"boolean","label":"Retain","display_format":null,"depends_on_component":"mqtt","advanced":true},{"key":"setup_priority","type":"float","label":"Setup Priority","display_format":null,"advanced":true,"hidden":true},{"key":"state_topic","type":"string","label":"State Topic","display_format":null,"templatable":true,"depends_on_component":"mqtt","advanced":true},{"key":"subscribe_qos","type":"string","label":"Subscribe QOS","display_format":null,"depends_on_component":"mqtt","advanced":true},{"key":"unlock_action","type":"trigger","label":"Unlock Action","description":"The action that should be performed when the remote (like Home Assistant's frontend) requests the lock to be unlocked.","display_format":null,"advanced":true,"help_link":"https://esphome.io/components/lock/template#configuration-variables"},{"key":"web_server","type":"nested","label":"Web Server","display_format":null,"depends_on_component":"web_server","advanced":true,"config_entries":[{"key":"web_server_id","type":"id","label":"Web Server ID","display_format":null,"depends_on_component":"web_server","references_component":"web_server","advanced":true},{"key":"sorting_group_id","type":"id","label":"Sorting Group ID","display_format":null,"advanced":true},{"key":"sorting_weight","type":"float","label":"Sorting Weight","display_format":null,"advanced":true}]}]}
0 commit comments