Skip to content

Conversation

RomRider
Copy link
Collaborator

@RomRider RomRider commented Oct 7, 2025

type: custom:button-card
entity: light.aquarium
protect: # globally enables the PIN for all actions
  pin: '1234'
  success_message: 'PIN is correct!'
  failure_message: 'PIN is wrong!'
tap_action:
  action: toggle
hold_action:
  action: perform-action
  perform_action: switch.toggle
  target:
    entity_id: switch.aquarium_pump
icon_tap_action:
  action: more-info
  entity: sensor.aquarium_temperature
  protect:
    pin: '' # Setting this to an empty string disables the pin for this action only.

Closes #1044

@RomRider RomRider merged commit 1680330 into dev Oct 7, 2025
5 checks passed
@RomRider RomRider deleted the main-protect branch October 7, 2025 18:53
github-actions bot pushed a commit that referenced this pull request Oct 7, 2025
## [5.1.0-dev.3](v5.1.0-dev.2...v5.1.0-dev.3) (2025-10-07)

### Features

* **protect:** allow configuring `protect` at the card level ([#1049](#1049)) ([1680330](1680330)), closes [#1044](#1044)
* **protect:** Support for `success_message` ([#1048](#1048)) ([78c7151](78c7151)), closes [#1046](#1046)
* **spinner:** Display a configurable spinning wheel (eg. while a script is running) ([#1047](#1047)) ([fb1963e](fb1963e))
Copy link

github-actions bot commented Oct 7, 2025

🎉 This PR is included in version 5.1.0-dev.3 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@Jonsonmon

This comment was marked as off-topic.

@dcapslock
Copy link
Collaborator

@Jonsonmon this should be in a discussion. PIN protects actions, not javascript templates.

It seems like you wish to PIN protect a dasbboard/view. If so then hide your dashboard/view, and protect an action that navigates to that dashboard/view.

@Jonsonmon

This comment was marked as off-topic.

@RomRider
Copy link
Collaborator Author

Please stop commenting here and open a discussion thread. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants