Working again after latest update
Thanks
Hi,
I have an issue since i updated to latest HA version, the label wont show up:
as you can see in picture below, i have three labels : Fan, Computers & Peripherals, TV
Non of them appearing, i can access the entities , just the label missing.
Code:
plugpop:
card:
type: 'custom:button-card'
color: auto
size: 30%
icon: '[[icon]]'
entity: '[[entity]]'
show_last_changed: true
aspect_ratio: 1/1
show_state: true
name: '[[name]]'
show_label: true
custom_fields:
notification: '[[notification]]'
tap_action:
action: call-service
service: browser_mod.popup
service_data:
title: Devices
style:
background: var(--background-image)
color: AliceBlue
border-radius: 15px
--ha-card-border-radius: 15px
--ha-card-background: '#646464'
card:
type: entities
style: |
ha-card {
--primary-text-color: AliceBlue;
--secondary-text-color: AliceBlue;
--paper-item-icon-color: AliceBlue;
color: AliceBlue;
}
entities:
- type: custom:fold-entity-row
head:
type: section
label: Fan
open: true
entities:
- entity: fan.ceiling_fan
- entity: fan.xiaomi_smart_fan
- entity: switch.sonoff_10006ceeab
name: Corner Fan
icon: mdi:fan
- type: custom:fold-entity-row
head:
type: section
label: Computers & Peripherals
open: true
entities:
- entity: switch.desktop
icon: mdi:desktop-tower
- entity: switch.mini_pc
icon: mdi:desktop-tower
- entity: display.mi_pad_4
icon: 'mdi:tablet-dashboard'
name: Mi Pad 4
- entity: binary_sensor.hp_printer_status
name: Printer
icon: mdi:printer
# - type: custom:fold-entity-row
# head:
# type: section
# label: Climate
# open: false
# entities:
# - type: custom:more-info-card
# entity: climate.mzgn_slvn
# title: Living Room
# - type: custom:more-info-card
# entity: climate.mzgn_khdr_shynh
# title: Bedroom
- type: custom:fold-entity-row
head:
type: section
label: TV
open: false
entities:
- type: custom:more-info-card
entity: media_player.living_room_tv
title: TV Living Room
- type: custom:more-info-card
entity: media_player.bedroom_tv
title: TV Bedroom
Thanks,
i don know how, but now itâs working so weird.
If you have problems after upgrading to 0.107, update fold-entity-row.
If you still have problems, itâll be down to your browser cache in 11 cases of 10.
To make sure, open your browser console and look for âFOLD-ENTITY-ROW 1.0.1 IS INSTALLEDâ.
If you do not see that - clear your caches.
If you do see that, and it still doesnât work - first try clearing your caches anyway, then ask.
@thomasloven as you donât have âCreate Feature Requestâ on Github, Iâll ask here.
Could you consider allowing a card in head
section? It would be really useful and make a lot of new use cases available.
For example, I currently have this (custom:stack-in-card with 6 button-cards inside)
that can be opened if I double-tap on the fan icon
but the top row and the extended view are completely independent entities so to achieve my goal I need to hide the bottom bits (2 fold-entity-rows and one input_boolean
) individually using card-mod
(or even mod-card
) - and thatâs not the nicest way of doing things.
If I had an ability to use my custom:stack-in-card
as head
card, itâd be much easier, neater and more intuitive as user could see a chevron next to the row (now only I know about that double-tap action ).
By the way, thanks a lot for the hui-element
, you created it just in time (I use it to add input_numbers
as cards to stack-in-card
here)!
âHey, could you add this feature?
By the way, thanks for creating this thing that does exactly that!â
Huh?
What am I missing here?
Easy! The part up to âBy the wayâ was about feature request for fold-entity-row
.
The âBy the wayâ bit was about your new hue-element
card - it works like a charm and all input_booleans
on the screenshot are added to stack-in-card using that card (without a need of creating an intermediate card for it).
Are you familiar to The Unix Philosophy?
Itâs a set of rules-of-thumb for how the programs in unix based computer systems should work.
The two most important parts are:
- Write programs that do one thing and do it well.
- Write programs to work together.
I wonât go into detail about all the reasons why this is such a great idea, but the gist of it is that yes, I could add that feature to fold-entity-row, document it, work around it on every future change, fix bugs in it, make sure it keeps up with changes in Home Assistant that would make it break, and make every user download a larger code file every time they reload lovelace. Or I could tell the few people who would want this to use the already existing thing that does exactly this, and you could add one more line of code to your configuration.
Iâm in since 2k.
tell me please. Iâm new to all this LL stuff and thatâs why Iâm asking here.
âŠ
Ok.
You see, thereâs this thing I made that exists purely to put cards where a row is expected, such as in fold-entity-row. Itâs called hui-element, and was mentioned earlier in this thread. Use that.
Ah⊠Do you know what? After reading the docs (and they donât say a lot on head
tbh) and seeing this
head:
type: section
label: Nested
or this
head: light.bed_light
I had an impression that it can be only entity_id or special things like section
.
My brain is still confused sometimes about all these rows, cards etc.
Now I realise that if we can use section
, itâs a row
element (not just a name) and yes, itâs possible to put hui-element
there.
Thanks for the hint, Iâll give it a go.
Maybe the docs will do with some extra words/example to help people like me understand what head
can accept?
UPDATE: yes, it works like a charm. thanks Thomas!
@thomasloven could you give me a hint how to achieve the following:
I use hui-element
to add a complex card (custom:stack-in-card with several custom:button-card
s inside) as head
of fold-entity-row
.
Currently if I click on one of the button-card
, two things happen:
-
fold-entity-row
folds/unfolds. - More-info dialog of the entity I clicked on appears.
Iâd love to change it so only (2) happens and the fold-entity-row
folds/unfolds only if I click on a chevron.
Could you advise me on what can be done here?
Using a card in head
is not really supported, but you could try to add tap_action: true
to the card configuration. That might work.
Thanks Thomas, I added tap_action: true
to configuration of the card that is in head
(stack-in-card) but it didnât change anything
sorry, I know this is a real noob question but I am a real beginner at all this and trying to read/learn/play but struggling.
I have this:
type: entities
title: Lawn Back Left
icon: 'mdi:sprinkler'
state_color: true
show_header_toggle: false
entities:
- switch.lawn_on_left_zone
- type: 'custom:fold-entity-row'
head:
type: section
label: Zone Timer
entities:
- input_number.plant_back_mins_on
all works (althoguh get error Expected a value of type undefined
for icon
but received "mdi:sprinkler"
. but the icon is there.
but, how do i add name and icon to my entities? I have tried the normal icon: mdi:xxxx but it doesnt work.
i want something like this:
type: entities
title: Lawn Back Left
icon: 'mdi:sprinkler'
state_color: true
show_header_toggle: false
entities:
- switch.lawn_on_left_zone
icon: mdi: sprinkler
name: Zone status
- type: 'custom:fold-entity-row'
head:
type: section
label: Zone Timer
entities:
- input_number.plant_back_mins_on
name: Timer set for
hope someoe can help, spent hours on it lol moving things around and reading but no joy. thanks in advance
Darren
When you want more control over the entity you need to define things slightly differently. The entity id itself needs to be preceded by the âentityâ key, your indentation is also a bit off.
Try this âŠ
type: entities
title: Lawn Back Left
icon: 'mdi:sprinkler'
state_color: true
show_header_toggle: false
entities:
- entity: switch.lawn_on_left_zone
icon: mdi:sprinkler
name: Zone status
- type: 'custom:fold-entity-row'
head:
type: section
label: Zone Timer
entities:
- entity: input_number.plant_back_mins_on
name: Timer set for
perfect, thank you so much, you I realised the alignment was a little out as i just typed it in here as an example, i was missing the entity at the front, works perfectly, thank you so much for taking the time to help.
EDIT: solved, see bottom
Maybe I am missing something really obvious, but it is frustrating me.
Using this code, I get a nice folding card with light entities and cover controls, but when I would like to create a list of sensors with one specific sensor âabove the foldâ, it gets me an error (Cannot read property 'map' of undefined / type: 'custom:fold-entity-row' / head: sensor.diesel_u
with / being a new line).
What am i missing here?
# This works fine
- type: entities
style: |
ha-card {
margin: 0px 14px -5px 14px;
}
entities:
- type: custom:fold-entity-row
head: group.lampen_woonkamer
- light.eetkamer_level
- binary_sensor.door_contact_2
- binary_sensor.door_contact_1
- cover.zolder
# This doesn't work - the header errors out but the 4 rows are shown (not folded)
- type: entities
style: |
ha-card {
margin: 0px 14px -5px 14px;
}
entities:
- type: custom:fold-entity-row
head: sensor.diesel_u
- sensor.diesel_u
- sensor.diesel_z
- sensor.benzine_u
- sensor.benzine_z
EDIT: And by typing this and looking at it again, I suddenly appears to me that I forgot to specify the entities key:
# This works fine
- type: entities
style: |
ha-card {
margin: 0px 14px -5px 14px;
}
entities:
- type: custom:fold-entity-row
head: sensor.diesel_u
entities:
- sensor.diesel_u
- sensor.diesel_z
- sensor.benzine_u
- sensor.benzine_z
Is there a way to add mdi icons to section labels?
head:
label: Doors
type: section
Iâve tried this
head:
label:
type: markdown
content: |
<ha-icon icon="mdi:door"></ha-icon> Doors
type: section
but [object Object] is displayed instead of the icon+text.