Template Helpers based on Triggers

Hi,

Can we create this kind of sensors from the UI please? The ability to create trigger-based template sensor helpers in general from the UI.

template:
  - trigger:
      - trigger: state
        entity_id: switch.kitchen
        from: 0
        attribute: current_consumption
    sensor:
      - name: kitchen_is_on
        state: "{{ now().timestamp() }}"
  - trigger:
      - trigger: state
        entity_id: switch.driveway
        from: "off"
        to: "on"
    sensor:
      - name: driveway_is_on
        state: "{{ now().timestamp() }}"
  - trigger: 
      - trigger: state
        entity_id: switch.pool
        from: "off"
        to: "on"
    sensor:
      - name: pool_is_on
        state: "{{ now().timestamp() }}"
  - trigger:
      - trigger: state
        entity_id: switch.pool
        from: "on"
        to: "off"
    sensor:
      - name: pool_is_off
        state: "{{ now().timestamp() }}"
  - trigger:
      - trigger: event
        event_type: timer.finished
        event_data:
          entity_id: timer.zone_1_timer
    sensor:
      - name: zone_1_is_finished
        state: "{{ now().timestamp() | as_datetime }}"

Please format code correctly; and don’t forget to vote for your own feature request.

Be clear: I think you’re asking for the ability to create trigger-based template sensor helpers in general from the UI.

1 Like