Does anyone have an example of using secondaryinfo-entity-row with auto-entities by chance? I cannot figure out how to make the two play nice together for the life of me. Thanks!
@thomasloven It sure would be nice to be able to use math somehow within [[ ]]
and be able to divide by 2.55 there rather than having to create new templated sensors for every dimmable light you want to see as brightness_pct
!
Tagging a person not a good way. Suggest you to create a FR in GitHub (link) for a needed functionality.
Hi Guys,
my Message starts like many others: I’m totally new to Home Assistant and it blows my mind! Sure I need some help with one thing or the other, as I’m coming from a totally different Smarthome mindset (FHEM, if somebody knows it).
I installed these great Custom Card, and it works fine with the provided samples, unfortunately with my own sensor it won’t.
Here is my YAML:
type: entities
title: Mülltonnen leerung
entities:
- entity: sensor.srhh_leerung_rest
name: Restmüll
type: custom:secondaryinfo-entity-row
secondary_info: [[ attribute:collection_date ]]
And just to be shure, here is the sensor creating the attribut I like to display:
- sensor:
- name: "srhh.leerung.rest"
state: >
{% set daysTo = (as_timestamp(states('sensor.stadtreinigung_hamburg_zuhause_schwarze_restmulltonne')) | timestamp_custom('%Y-%m-%d', True) | as_datetime).date() - now().date() %}
{% if daysTo.days == 0 %}heute{% elif daysTo.days == 1 %}morgen{% else %}in {{daysTo.days}} Tagen{% endif %}
attributes:
collection_date: "{{ as_timestamp(states('sensor.stadtreinigung_hamburg_zuhause_schwarze_restmulltonne')) | timestamp_custom('%Y-%m-%d') }}"
I’m running out of ideas, not even Google helped me with the messega I get
Any hints somebody?
Sorry guys for the off-topic, but it doesn’t seem like I’m able to PM mr. Romquenin
May I ask how did you manage to get this kind of card with the badge displayed? I’m trying to create exactly the same card (Time to bus) as you showed there with info in the badge, but failing miserably…
I do have custom-ui installed and currently displaying sensors in “entities” type card with additional info in custom:secondaryinfo-entity-row type entity. Tried adding “extra_badge” attribute all around, but without any luck.
Could you share your card config maybe?
Thanks a zillion!
Imho that was a MS Paint …
A similar may be achieved by multiple-entity-row.
Had a brief look at that repo; a code posted in “ui-lovelace” does not have any badges.
aha! thanks Ildar! that’s an interesting card. seems like it does mention rendering state-badge component in the code, just not exactly sure yet it if it visually looks like a badge there will have to give it a run
The m-e-r card may be modded by card-mod to achieve this:
Go to huge card-mod thread → 1st post → link at the bottom → styles for m-e-r
Have no idea how standard badges can be embedded into standard entity-row or custom ones like m-e-r or secondaryinfo-entity-row.
Thanks Ildar! Yeah, not exactly badges I was looking for, but meanwhile something like this card might work out as well thanks for taking your time dude!
Is it possible to have a weblink (URL) in a secondary info? If so please show an example.
Hi, can I put the status of another sensor as secondary_info?
For example:
entity: sensor.xxx
secondary_info: “[[ sensor.yyy.state ]]”
try
- type: custom:secondaryinfo-entity-row
entity: ...
secondary_info: >-
{{ states('sun.sun') }}
Not working.
I tried these ways:
`[[ sensor.timestamp_nani_ibeacon_0b2f.attributes.state ]]
{{ state_attr(‘sensor.timestamp_nani_ibeacon_0b2f’, ‘state’) }}
“[[ sensor.timestamp_nani_ibeacon_0b2f.state ]]”
{{ states(‘sensor.timestamp_nani_ibeacon_0b2f’) }}`
you used the same entity, my question was different
From all my hearth, I hope you are not waiting 6 years for that, but from your message (which looks like is using the same card I’m trying to set right now), I went into a rabbit hole, and found a way to show up in a formated way.
This is my card:
It is Chore Helper that relies on the auto-entities card to show up. When a task is manual, I struggle to see when was done last time. And this was my solution (mine + google + chatGPT + DevTool + 100 tries):
type: custom:auto-entities
card:
type: entities
title: No Date
state_color: true
show_header_toggle: true
filter:
include:
- integration: chore_helper
state 1: unknown
options:
tap_action:
action: call-service
service: chore_helper.complete
service_data:
entity_id: this.entity_id
hold_action:
action: more-info
double_tap_action:
action: more-info
type: custom:secondaryinfo-entity-row
secondary_info: >-
Last time done: {{ states.this.entity_id.attributes.last_completed |
as_timestamp | timestamp_custom('%d.%m.%Y %H:%M') }}
sort:
method: state
numeric: true
show_empty: false
I hope that if doesn’t you, help someone in the future. Cheers!
Bom dia. Eu gostaria de colocar com segunda Info o last period do sensor. Como poderei fazer. Sou novo nestas andanças.
Obrigado