@xescure wrote:
smart_toggle: sequence: service_template: > {% if is_state("group.bedroom", "on") %} homeassistant.turn_off {% else %} homeassistant.turn_on {% endif %} data_template: entity_id: "{{ entity_id }}"
In this script I have already successfully pulled the
entity_id
that was put in as an argument for the script’s service call, but I would like to also use it in theservice_template
. Like this:{% if is_state("{{ entity_id }}", "on") %}
However that doesn’t seem to work.Any ideas?
Posts: 4
Participants: 2