Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 99284

Help with condition template

$
0
0

@denis.besir wrote:

Hi,

I need some help with this condition template. I need it to return when { task_old.task_title == ‘task’}.

- id: '5166189215216854'      
  alias: DALS vacuum bedroom done
  description: ''
  trigger:
  - entity_id: sensor.gtasks_dagpass
    platform: state
  condition:
    condition: template
    value_template: >
        {% for task_old in trigger.from_state.attributes['tasks'] %}
          {% if task_old not in trigger.to_state.attributes['tasks'] %}
            { task_old.task_title == 'task'}
          {% endif %}
        {% endfor %}
  action:
  - service: notify.pushbullet
    data_template:
      message: >
        {% for task_old in trigger.from_state.attributes['tasks'] %}
          {% if task_old not in trigger.to_state.attributes['tasks'] %}
            {{ task_old.task_title }}
          {% endif %}
        {% endfor %}
      title: Hass.io

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 99284

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>