How to create a "entity-button" for restart and stop HA

I tried what worked for other service calls but this one doesn’t need an entity which I think is the issue… Any idea?

cards:
  - type: horizontal-stack
    cards:
      - type: entity-button
        tap_action: call-service
        service: homeassistant.restart
        icon: mdi:restart
        color: auto
        name: Redémarrer HA
      - type: entity-button
        tap_action: call-service
        service: homeassistant.stop
        icon: mdi:power
        color: auto
        name: Arrêter HA 

2018-11-12%2013_32_25-Home%20Assistant

Maybe put the homeassistant.stop/restart services in scripts and turn them on like in the example.

ah thanks, I tried this way and it work :slight_smile:

  - type: horizontal-stack
    cards:
      - type: entity-button
        tap_action: call-service
        service: script.toggle
        entity: script.restart_ha
        icon: mdi:restart
        color: auto
        name: Redémarrer HA
      - type: entity-button
        tap_action: call-service
        service: script.toggle
        entity: script.stop_ha
        icon: mdi:power
        color: auto
        name: Arrêter HA

2018-11-12%2015_11_42-Home%20Assistant