piitaya / lovelace-mushroom

Build a beautiful Home Assistant dashboard easily
Apache License 2.0
3.44k stars 320 forks source link

[Feature]: Make Alarm Card display error message when entered code is invalid #1290

Closed adamf83 closed 2 months ago

adamf83 commented 9 months ago

Requirements

Is your feature request related to a problem?

If a user enters the incorrect alarm code, for example, when disarming the alarm, the code is simply cleared and no message to say the code was invalid is displayed.

Describe the solution you'd like

I’d like to see the words “Invalid Code” or something similar displayed if an incorrect code is entered.

Describe alternatives you've considered

The custom card from Alarmo has this feature, but I prefer the style of the mushroom cards, hence I’d prefer to use them.

Additional context

No response

Laxilef commented 1 month ago

Hi @piitaya Same problem. I use Alarmo and it does not allow me to arm it if any door is open. The Alarmo card at this moment displays a list of objects (sensors): alt text

Could you add an option to display an error message in the card? For example, we could add an "error_message" parameter (template) or something like that.

Example template:

error_message: >
  {% if state_attr('alarm_control_panel.master', 'open_sensors') is iterable %}
  {% for value in state_attr('alarm_control_panel.master', 'open_sensors') -%}
  - {{ state_attr(value, 'friendly_name') }} ({{ area_name(value) }})
  {% endfor %}
  {% endif %}

Thanks!