I’m getting the following error in my logs and can’t put my finger on the problem. Can anyone point me in the right direction?
Error
Amps - check amp status: Error executing script. Unexpected error for call_service at pos 1: 400: message cannot be blank
Script
alias: Amps - check amp status
description: ''
trigger:
- platform: time_pattern
minutes: /50
condition:
- condition: or
conditions:
- condition: state
entity_id: switch.relay2
state: 'on'
- condition: and
conditions:
- condition: template
value_template: >-
{{ ((as_timestamp(now()) -
as_timestamp(states.switch.relay2.last_changed)) / 60) | int > 120
}}
- condition: state
entity_id: switch.relay1
state: 'on'
- condition: and
conditions:
- condition: template
value_template: >-
{{ ((as_timestamp(now()) -
as_timestamp(states.switch.relay1.last_changed)) / 60) | int > 120
}}
action:
- service: notify.pushover1
data:
title: HA
target: James-iPhone
message: |
{% if (states.switch.relay2.state == 'on') and ((as_timestamp(now()) -
as_timestamp(states.switch.relay2.last_changed)) / 60) | int > 120 and
(states.switch.relay1.state == 'on') and ((as_timestamp(now()) -
as_timestamp(states.switch.relay1.last_changed)) / 60) | int > 120 %}
Indoor and Outdoor Amps have been on for more than 2 Hours
{% elif (states.switch.relay2.state == 'on') and ((as_timestamp(now()) -
as_timestamp(states.switch.relay2.last_changed)) / 60) | int > 120 %}
Indoor Amp (Amp2) has been on for more than 2 Hours
{% elif (states.switch.relay1.state == 'on') and ((as_timestamp(now()) -
as_timestamp(states.switch.relay1.last_changed)) / 60) | int > 120 %}
Outdoor Amp (Amp1) has been on for more than 2 Hours
{% endif %}
mode: single
Thanks!