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
VDRainer
(🍻)
2
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
- 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