Closed Mariusthvdb closed 3 years ago
same
Same here, just want to clarify that clicking the icon works, but not the text/label/name, nor state.
Ordinary entities card:
With template-entity-row:
Please try version 1.2.0
Thanks, but 1.20 made no change for me.
Installed via HACS, reloaded (cleared cache) Restarted HA. Home Assistant 2021.6.2 template-entity-row 1.2.0
Example config:
- entity: sensor.unavailable_entities_tmpl
active: '{{ states(config.entity) | int > 0 }}'
name: Enheter utan data
secondary: '{{ as_timestamp(states[config.entity].last_changed) | timestamp_local }}'
type: custom:template-entity-row
hold_action:
action: call-service
confirmation: true
service: script.update_unavailable_entities
Like before:
Just ping me if you want me to try something or provide logs.
oddly enough, it does 2 things:
this is not a cache thing, its the same on Safari (sorry), Chrome, and both app and browser on iPhone
After testing on another computer to make sure it wasn't a cache thing (which it probably was..), I agree with @Mariusthvdb with one addition: The localization doesn't semm to work any more ("In evaluated templates the function (
code:
- entity: binary_sensor.rorelsesensor_i_entre_tmpl
active: '{{ states(config.entity) == "on" }}'
condition: '{{ states(config.entity) == "on" }}'
state: _(component.binary_sensor.state.motion.{{ states(config.entity) }})
secondary: >-
{{ as_timestamp(states[config.entity].last_changed) |
timestamp_local }}
type: custom:template-entity-row
fixed with 1.2.1! thanks Thomas
@Mariusthvdb Can you try an example like mine, with a state: _(component.binary_sensor.state.motion.{{ states(config.entity) }})
?
That still doesn't work for me, but maybe that's a separate issue? The other issues, icons, click opens more-info and so on seems to work fine!
Again, probably a cache issue. I'll test a bit more. Thanks a lot Thomas!
Yes, that is a separate issue, and should be fixed with 1.2.1, so make sure your browser console says you have that installed.
thank you so much Thomas, this is really very very cool!
please let me ask 1 thing here about the syntax format: is it correct we have to write it like this:
hold_action: |
{
'action': 'url',
"url_path": "{{state_attr(config.entity,'latest_release_url')}}"
}
where a correct syntax (and much simpler) in the action would also be:
hold_action:
action: url
url_path: >
{{state_attr(config.entity,'latest_release_url')}}
the latter does move away from the view, but to another internal view somehow.
again, thank you very much!
Correct.
I assume the second would try to navigate to "https://YOUR-HA-URL/{{state_attr(config.entity,'latest_release_url')}}" without evaluating the template.
almost:
https://mydomain.duckdns.org:port/ui-settings/%7B%7Bstate_attr(config.entity,'latest_release_url')%7D%7D
and as expected it does nothing, other than navigate to https://mydomain.duckdns.org:port/ui-settings/
if this has settled down (your efforts I mean), would it be at all possible to enhance the row so it accepts these 'easier' configs? I ask because all other templates accept regular easy jinja...
first logged on auto-entities, this seems to be an template-entity-row issue after all, therefor please allow a dedicated issue in this repo:
(no error in the inspector is displayed) but as of ha 2021.6, clicking a row doesn't popup the more-info anymore, nor does the hold navigate to the configured view:
this worked perfectly up to 2021.6. I've also tested with wildcard entities, and the result is identical: the frontend shows the entities alright, and all secondary info etc etc is correct, but no action is executed.
simpler config with an explicit entity:
the bump to version #1.1.2 doesn't fix this issue. please have a look