There might a way, since lovelace_gen allows for Jinja 2 templating.
According to this , using :
{{ 'my First cAR'|capitalize }}
will output
My first car
I havenāt tested it yet, but Iām looking for something similar. iāll have a look at it in the next few days.
Edit: It works
- !include
- ../../templates/button_chore.yaml
- chore: chores_livingroom_clean_floor
name: {{ 'Nettoyer Le Sol'|capitalize }}
Gives me
youāre suggesting this would work for my decluttering template also? All I can see is the actual code with the {{ }} bracesā¦
Not sure about decluttering template ā¦ However you can achieve a similar result with lovelace_gen only, this Iām pretty sure of. Use an include statement with id as parameter and it should work as intended.
ok thanks.
Donāt use lovelace_gen though, thought that to be the auto ui-lovelace.yaml generator? I use yaml mode for lovelace so need to write it myself
not to clutter this thread any further, Iāll take this to the decluttering card thread
another quest: can we template the head field somehow? I think Ive read all doc and examples, but canāt find it, yet it seems so very useful:
- type: custom:fold-entity-row
head:
type: section
label: >
{% set unknown = states|selectattr('state','eq','unknown')|map(attribute='entity_id')|list %}
Unknown entities: ({{ unknown|count }})
entities:
- type: custom:hui-markdown-card
content: |
{{ state_attr('sensor.entities_uun','Unknown')}}
which now renders:
so have to fall back to:
1 Like
LintHart
(Linton)
December 21, 2019, 2:16am
26
Hey @thomasloven , is it possible to do a Horizontal stack for button cards within a folding row? Tried a couple of things but if Lovelace doesnāt start up error out, the whole row disappears.
Thank you
Linton
lpt2007
(lpt2007)
December 22, 2019, 8:01pm
27
Can I use fold-entity-row
with upcoming-media-card
?
How?
I try like this, but not working:
cards:
- entities:
- entity: sensor.kodi_recently_added_movies
image_style: fanart
date: ddmm
clock: 24
type: 'custom:upcoming-media-card'
- entity: sensor.kodi_recently_added_movies
image_style: fanart
date: ddmm
clock: 24
type: 'custom:upcoming-media-card'
head:
label: test
type: section
type: 'custom:fold-entity-row'
or
cards:
- entity: sensor.kodi_recently_added_movies
image_style: fanart
date: ddmm
clock: 24
type: 'custom:upcoming-media-card'
- entity: sensor.kodi_recently_added_movies
image_style: fanart
date: ddmm
clock: 24
type: 'custom:upcoming-media-card'
head:
label: test
type: section
type: 'custom:fold-entity-row'
thomasloven
(Thomas LovƩn)
December 22, 2019, 10:57pm
28
thomasloven
(Thomas LovƩn)
December 22, 2019, 11:00pm
29
What even is this?
cards:
- entities:
What?
1 Like
lpt2007
(lpt2007)
December 23, 2019, 7:50am
30
Sorry still learning correct card configuration:)
thomasloven
(Thomas LovƩn)
December 23, 2019, 9:25am
31
Itās all little blocks. Make each block work by itself, with something really simple inside, and then put the blocks together.
Start with an entities card with an upcoming-media-card in the entities.
Then try making a fold-entity-row with just a normal entity inside.
Then look at whatās simmilar between the entity card and fold-entity-row configurationsā¦
lpt2007
(lpt2007)
December 23, 2019, 9:48am
32
Now I understan, thanks.
entities:
- entity: sensor.kodi_recently_added_movies
image_style: fanart
type: 'custom:upcoming-media-card'
head:
label: MOVIES
type: section
padding: 0
type: 'custom:fold-entity-row'
cards:
- entities:
- entity: sensor.kodi_recently_added_movies
image_style: fanart
type: 'custom:upcoming-media-card'
head:
label: MOVIES
type: section
padding: 0
type: 'custom:fold-entity-row'
- entities:
- entity: sensor.kodi_recently_added_tv
image_style: fanart
type: 'custom:upcoming-media-card'
head:
label: EPISODES
type: section
padding: 0
type: 'custom:fold-entity-row'
type: horizontal-stack
1 Like
lpt2007
(lpt2007)
December 23, 2019, 11:30am
33
I have problem putting together fold-entity-row
and tiles-card
tiles-card
is working:
here is config:
card_settings:
background: var(--paper-card-background-color)
column_width: calc(97%/4)
columns: 4
row_height: 75px
title_align: left
global_settings:
border:
color:
value: black
radius: 5px
size: 3px
icon:
color:
value: white
label_sec:
color:
value: white
shadow: 'elevation: 6dp'
entities:
- column: 1
entity: script.bedroom_rpi3_kodi_input_home
icon:
value: 'mdi:home'
row: 1
- column: 2
entity: script.bedroom_rpi3_kodi_input_contectx_menu
icon:
value: 'mdi:menu'
label_sec:
value: Menu
row: 1
- background:
value: '#2576da'
column: 3
entity: script.bedroom_rpi3_kodi_input_up
icon:
value: 'mdi:arrow-up-bold-circle'
row: 1
- column: 4
entity: script.bedroom_rpi3_kodi_input_info
icon:
value: 'mdi:information-outline'
label_sec:
value: Info
row: 1
- column: 1
entity: script.bedroom_rpi3_kodi_player_play_pause
icon:
value: 'mdi:play-pause'
row: 2
- background:
value: '#2576da'
column: 2
entity: script.bedroom_rpi3_kodi_input_left
icon:
value: 'mdi:arrow-left-bold-circle'
row: 2
- column: 3
entity: script.bedroom_rpi3_kodi_input_select
icon:
value: 'mdi:check-circle-outline'
row: 2
- background:
value: '#2576da'
column: 4
entity: script.bedroom_rpi3_kodi_input_right
icon:
value: 'mdi:arrow-right-bold-circle'
row: 2
- column: 1
entity: script.bedroom_rpi3_kodi_player_stop
icon:
value: 'mdi:stop'
row: 3
- column: 2
entity: script.bedroom_rpi3_kodi_input_back
icon:
value: 'mdi:backburger'
label_sec:
value: Return
row: 3
- background:
value: '#2576da'
column: 3
entity: script.bedroom_rpi3_kodi_input_down
icon:
value: 'mdi:arrow-down-bold-circle'
row: 3
- column: 4
entity: script.bedroom_rpi3_kodi_input_next_subtitle
icon:
value: 'mdi:subtitles-outline'
label_sec:
value: Subtitle
row: 3
- column: 1
entity: script.bedroom_rpi3_kodi_player_rewind
icon:
value: 'mdi:rewind'
row: 4
- column: 2
entity: script.bedroom_rpi3_kodi_player_fast_fwd
icon:
value: 'mdi:fast-forward'
row: 4
- column: 3
entity: script.bedroom_rpi3_kodi_player_skip_back
icon:
value: 'mdi:skip-previous'
row: 4
- column: 4
entity: script.bedroom_rpi3_kodi_player_skip_next
icon:
value: 'mdi:skip-next'
row: 4
- column: 1
entity: script.bedroom_rpi3_kodi_player_skip_back_30
icon:
value: 'mdi:rewind-30'
row: 5
- column: 2
entity: script.bedroom_rpi3_kodi_player_skip_back_10
icon:
value: 'mdi:rewind-10'
row: 5
- column: 3
entity: script.bedroom_rpi3_kodi_player_skip_forward_10
icon:
value: 'mdi:fast-forward-10'
row: 5
- column: 4
entity: script.bedroom_rpi3_kodi_player_skip_forward_30
icon:
value: 'mdi:fast-forward-30'
row: 5
type: 'custom:tiles-card'
This is closest I can get If I remove card_settings:
and global_settings:
from tiles-card
lpt2007
(lpt2007)
December 25, 2019, 11:28am
34
Is tiles-card compatible with fold-entity-row
?
thomasloven
(Thomas LovƩn)
December 25, 2019, 8:35pm
35
I have no idea what youāre trying to accomplish but the readme for fold-entity-row says that the purpose is:
Fold away and hide rows in lovelace entities cards.
If youāre not using it in an entities card, or are not using it with rows for entities cards, I give no guarantees - and it would be much faster for you to try it than for me.
1 Like
lpt2007
(lpt2007)
December 26, 2019, 3:09pm
36
Thanks for your time @thomasloven .
I try to make show/hide row with remote control for kodi.
Like This:
Is this possible?
Syrius
(Jeremy)
January 7, 2020, 12:58am
38
Great Addition to Home Assistant! Thanks @thomasloven
Is there a way you can collapse the row after pressing a button within?
Stiofan
(Stiofan de Geata)
January 22, 2020, 1:51pm
39
Hello Thomas;
Iāve just started playing with this module and i am enjoying its results so far. I am wondering though if the card is template-able or if i can use conditions on some of the items? I would for example like to use a condition on the āshowā element based on the state of another entity, and when that state changes it folds up and another row could be automatically opened. Possible???
hazio
January 22, 2020, 10:29pm
40
Hi, great work with the add-on, should be integrated with HA!
One issue I am facing is, that I am unable to change the icon of the head
main group icon, hereās the code below:
entities:
- type: 'custom:fold-entity-row'
head: media_player.downstairs_speakers
icon: 'mdi:speaker'
entities:
- entity: media_player.one_speaker
type: 'custom:mini-media-player'
artwork: cover
group: true
icon: 'mdi:google-home'
info: scroll
- entity: media_player.two_speaker
type: 'custom:mini-media-player'
group: true
icon: 'mdi:google-home'
info: scroll
- type: 'custom:fold-entity-row'
head: media_player.upstairs_speakers
icon: 'mdi:speaker'
entities:
- entity: media_player.three_speaker
type: 'custom:mini-media-player'
artwork: cover
group: true
icon: 'mdi:google-home'
info: scroll
- entity: media_player.four_speaker
type: 'custom:mini-media-player'
group: true
icon: 'mdi:google-home'
info: scroll
- entity: media_player.five_speaker
type: 'custom:mini-media-player'
group: true
icon: 'mdi:google-home'
info: scroll
title: Speakers
type: entities
Not sure what Iām doing wrong, any help will be appreciated!
Many thanks.