so this was going to be my first browser-mod more-info, but I am not getting the correct syntax, so turn to your assistance please:
- type: custom:auto-entities
card:
type: entities
# title: Family abroad
card_mod: &style
style: |
ha-card {
margin: 0px -16px;
box-shadow: none;
}
tap_action:
action: fire-dom-event
browser_mod:
command: more-info
parameter: >
{{states(config.entity|replace('duration','route'))}}
filter:
include:
- entity_id: sensor.*naar_huis_duration
options:
type: custom:template-entity-row
name: >
{{state_attr(config.entity,'friendly_name').split(' Dur')[0]}}
state: >
{{states(config.entity)}} min - {{states(config.entity|replace('duration','distance'))}} km
secondary: >
{{states(config.entity|replace('duration','route'))}}
# secondary_info: last-changed
sort:
method: state
the section in the astro-entities filter does all work, so I am positive about the template under secondary.
However, id love that show on more-info when tapping the entity, simply because the secondary line is too small to display.
hence my effort to show the same template on a tap action on the entity (did try it in the filter section options, but that didnt work either.) Yet nothing showing but the real entityās more-infoā¦
if I do
filter:
include:
- entity_id: sensor.*naar_huis_duration
tap_action:
action: fire-dom-event
browser_mod:
command: more-info
parameter: >
{{states(config.entity|replace('duration','route'))}}
the whole entity disappearsā¦
please have a look where my error lies? thanks!
update
type: custom:template-entity-row
# tap_action:
# action: fire-dom-event
# browser_mod:
# command: popup
# title: Whatever
name: >
{{state_attr(config.entity,'friendly_name').split(' Dur')[0]}}
state: >
{{states(config.entity)}} min - {{states(config.entity|replace('duration','distance'))}} km
secondary: >
{{states(config.entity|replace('duration','route'))}}
tap_action:
action: fire-dom-event
browser_mod:
command: toast
message: Hello, world!
make the toaster appear alright, so that would at least tell me the spot in the crd co fig is correct under the template-entity-row
now how to get the syntax for showing
command: more-info
entity: >
{{states(config.entity|replace('duration','route'))}}