WTH are confirmation not working for call-service in entities card?

This is what I wanted to do in 4 steps :

  1. add a platform to monitor and control my modem/router from my provider (orange) : OK thanks to the https://github.com/Cyr-ius/hass-livebox-component
  2. list entities and attributes from this sensor in an entities card : OK
  3. add to this card, at the end of the list a CTA (call to action) to reboot my modem : OK thanks to the entity type “call-service”
  4. Add a confirmation text when this CTA is clicked, because it can be clicked accidently : KO

The action documentation refers to “confirmation” in order to do so : https://www.home-assistant.io/lovelace/actions/

So I tried to adapt this syntax for my “call-service” in “entities card” but unfortunately it does not seem to work in this context… WTH ?

It would be a nice feature and would avoid the need to vertically stack cards for such simple need :slight_smile:

This is what this configuration would look like :

type: entities
title: My modem
entities:
  - entity: binary_sensor.orange_livebox_wan_status
  - type: call-service
    icon: 'mdi:power'
    name: Reboot modem
    action_name: Reboot
    service: mymodem.reboot
    confirmation:
      text: Are you sure you want to restart?

My 2 cents.

because your formatting is wrong…

type: entities
title: My modem
entities:
  - entity: binary_sensor.orange_livebox_wan_status
  - type: button
    name: Reboot modem
    action_name: Reboot
    tap_action:
      action: call-service
      service: mymodem.reboot
      confirmation:
        text: Are you sure you want to restart?

Moving this to configuration from WTH.

Oopsie ! Thanks for the clarification as it does not seems to be a WTH :sweat_smile:

Your given code does not work but is almost correct : instead of “entity: button” it should be “type: button” and then it works, thanks !

The correct answer :

type: entities
title: My modem
entities:
  - entity: binary_sensor.orange_livebox_wan_status
  - type: button
    name: Reboot modem
    action_name: Reboot
    icon: 'mdi:power'
    tap_action:
      action: call-service
      service: mymodem.reboot
      confirmation:
        text: Are you sure you want to restart?

ah yes, I was moving things around.

1 Like