Hello,
struggling with starting 2 or more services. I want to achieve that when I press a button in lovelace to restart home assistant (not the server but HA) prior in doing that disable my pihole for 5min).
Having a button to do that (pause pihole) already works well, but I want to put it in a sequence/script.
It works when I want to use a button with one service call. But when I want to punt in 2 service call it can’t.
So I decided to use a script but when I call the script is says failed to call service script/name…
This is what I am using:
Lovelace glancecard:
entities:
- entity: zone.home
icon: 'mdi:restart'
name: PiHole 5m - Home Assistant
tap_action:
action: call-service
service: script.restart_ha_incl_pihole_5min
show_name: true
show_state: false
type: glance
Scripts.yaml (which turns green, no errors?)
'restart_ha_incl_pihole_5min':
sequence:
- service: pi_hole.disable
service_data:
duration: '00:05:00'
- delay:
seconds: 1
- service: homeassistant.restart
service_data:
entity_id: zone.home
These log errors:
2020-02-13 10:31:44 ERROR (SyncWorker_8) [homeassistant.util.yaml.loader] while scanning for the next token found character ‘\t’ that cannot start any token in “/config/scripts.yaml”, line 8, column 1 2020-02-13 10:31:44 ERROR (MainThread) [homeassistant.components.script] while scanning for the next token found character ‘\t’ that cannot start any token in “/config/scripts.yaml”, line 8, column 1
2020-02-13 10:32:49 ERROR (SyncWorker_3) [homeassistant.util.yaml.loader] while scanning for the next token found character ‘\t’ that cannot start any token in “/config/scripts.yaml”, line 8, column 1 2020-02-13 10:32:49 ERROR (MainThread) [homeassistant.components.script] while scanning for the next token found character ‘\t’ that cannot start any token in “/config/scripts.yaml”, line 8, column 1 2020-02-13 10:34:36 ERROR (SyncWorker_9) [homeassistant.util.yaml.loader] while scanning for the next token found character ‘\t’ that cannot start any token in “/config/scripts.yaml”, line 8, column 1 2020-02-13 10:34:36 ERROR (MainThread) [homeassistant.components.script] while scanning for the next token found character ‘\t’ that cannot start any token in “/config/scripts.yaml”, line 8, column 1 2020-02-13 10:34:43 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140468706477072] Error handling message: expected dict for dictionary value @ data[‘service_data’]. Got ‘script.disablepiholefor5minanrestarthass’ 2020-02-13 10:35:00 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140468706477072] Error handling message: expected dict for dictionary value @ data[‘service_data’]. Got ‘script.disablepiholefor5minanrestarthass’ 2020-02-13 10:35:04 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140468706477072] Error handling message: expected dict for dictionary value @ data[‘service_data’]. Got ‘script.disablepiholefor5minanrestarthass’ 2020-02-13 10:35:08 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection.140468706477072] Error handling message: expected dict for dictionary value @ data[‘service_data’]. Got ‘script.disablepiholefor5minanrestarthass’ 2020-02-13 10:37:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved