Hello all, I’ve been trying to solve a problem for a few days. My automation doesn’t start a rest service automatically but I can launch it manually.
Sensor :
# Templates Sensors
template:
- sensor:
- name: "Heater Remote Control"
state: >
{% if states("sensor.thermometre_sdb") | float < 25.0 %}
True
{% else %}
False
{% endif %}
Rest Command :
# Commande REST pour contrôle des Switchbot devices
rest_command:
switchbot_batchroom_heater_remote_control:
url: !secret switchbot_hub_remote_heater_url
method: POST
headers:
authorization: !secret switchbot_api_key
accept: "application/json, text/html"
user-agent: "Mozilla/5.0 {{ useragent }}"
payload: '{"command": "Power","parameter": "default","commandType": "customize"}'
content_type: "application/json; charset=utf-8"
verify_ssl: true
type or paste code here
Automation :
- id: set_heater_on
alias: Set Heater On
trigger:
- platform: state
entity_id: automation.set_heater_on
to: 'True'
condition: []
action:
- service: rest_command.switchbot_batchroom_heater_remote_control
mode: single
Can you help me please ?
Thanks