You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Would it be possible to add support for service responses so we could pull data from a service such as todo.get_items and iterate over the response?
For the moment I'm doing something like this, but the problem is that it requies a template sensor and an automation to get data from the service and store it in the attribute-field. With support for service responses it would be nice to be able to drop the automation and sensor template.
- type: custom:vertical-stack-in-card
title: HA Tasks
card_mod:
style:
$: |
.card-header { padding: 12px 16px 4px 16px !important; }
cards:
- type: custom:auto-entities
card:
type: grid
columns: 1
square: false
card_param: cards
filter:
template: >-
{% set items = state_attr("sensor.home_todo_list", "items") | list -%}
{%- for i in items -%}
{% set task_due = i.due or '' -%}
{% set task_description = i.description or '' -%}
{{
{
'type': 'custom:button-card',
'name': i.summary,
'template': 'todo_item',
'variables': {
'task_uid': i.uid,
'task_name': i.summary,
'task_description': task_description,
'task_status': i.status,
'task_due': task_due,
'task_entity': 'todo.home'
}
}
}},
{%- endfor %}
The text was updated successfully, but these errors were encountered:
Compare a template sensor & trigger-based template sensor.
The "simple" template sensor only resolves a template(s) to determine a state (and/or attributes).
The trigger-based template sensor can perform some ACTIONS before resolving templates - and these actions are performed after a trigger executed.
Here in auto-entities card you propose to add some kind of "actions" which are supposed to be performed before applying a filter (defined inside a template option, for instance). What is supposed to be a "trigger" here? A page refresh? Opening a view? "Every minute" tick?
With my all respect, for me this FR seems to be a complication; since there are standard ways to achieve the same - no need to incorporate it to a this card.
Similar to this request: custom-cards/flex-table-card#131
Would it be possible to add support for service responses so we could pull data from a service such as todo.get_items and iterate over the response?
For the moment I'm doing something like this, but the problem is that it requies a template sensor and an automation to get data from the service and store it in the attribute-field. With support for service responses it would be nice to be able to drop the automation and sensor template.
The text was updated successfully, but these errors were encountered: