Hi All,
I was struggling also with trigger templates and slit config. This is how I solved it:
only a error in VSC with the !include but all sensors, binary_sensors and triggers working.
Incorrect type. Expected: "object".
template:
- sensor: !include integrations/template_sensor.yaml
- binary_sensor: !include integrations/template_binary_sensor.yaml
- !include_dir_merge_named integrations/template_trigger.yaml
/template_sensor.yaml
---
- name: "Group Family Manual"
unique_id: "3e43a954-abc1-447a-af7c-8f789ba73f2f"
state: "{{ is_state('input_boolean.helpers_kay_home_homekit', 'on') or is_state('input_boolean.helpers_peter_home_homekit', 'on') }}"
device_class: presence
delay_off: "00:15:00"
etc, etc
/template_binary_sensor.yaml
---
- name: "Asus devices offline"
state: "{{ integration_entities('asusrouter') | select('is_state', 'not_home') | list | count > 0 | float(false) }}"
unique_id: "42a19e1a-9396-42a9-81a1-94e8ee74fa5d"
attributes:
entity_id: "{{ integration_entities('asusrouter') | select('is_state', 'not_home') | list }}"
etc, etc
/template_trigger.yaml
---
trigger:
- trigger:
- platform: event
event_type: "imap_content"
id: "custom_event"
event_data:
sender: !secret imap_sender_2
sensor:
- name: "Imap import DW NS"
state: >-
{% if 'DiSys' in trigger.event.data["subject"] %}
Nieuwe DW
{% endif %}
attributes:
Message: "{{ trigger.event.data['text'] }}"
Date: "{{ trigger.event.data['date'] }}"
etc, etc