jhhbe
November 11, 2018, 5:15pm
1
I have an office and a bedroom on groundfloor and first floor and both in the attic - cards I have are:
Office
Main
Attic
and
Bedrooms
master
child1
child2
Attic
but for the attic I don’t want a card looking like:
Attic
Attic
Attic
as I wouldn’t know what is what besides the fact that it looks very odd.
I’ve seen https://www.home-assistant.io/lovelace/entities/#options-for-entities but can’t work out what it is. The GUI editor keeps complaining about what I do.
type: entities
id: tp_zolder
title: Zolder
show_header_toggle: true
entities:
- switch.wenzhou_tkb_control_system_tz56_wall_switch_onoff_switch
- switch.wenzhou_tkb_control_system_tz56_wall_switch_onoff_switch2
- light.level
Where-ever I try to put in name: it keeps complaining.
Suggestions welcome!
Thx
Jhh
Moved to config - frontend rather than show off your projects - frontend
petro
(Petro)
November 11, 2018, 8:57pm
2
So rename the devices. There are about 3 examples in the documentation you linked below the section you are looking at https://www.home-assistant.io/lovelace/entities/
Copied directly from documentation:
- type: entities
title: Entities card sample
show_header_toggle: true
entities:
- entity: alarm_control_panel.alarm
name: Alarm Panel
- device_tracker.demo_paulus
- switch.decorative_lights
- group.all_lights
- group.all_locks
applied to your yaml:
- type: entities
id: tp_zolder
title: Zolder
show_header_toggle: true
entities:
- entity: switch.wenzhou_tkb_control_system_tz56_wall_switch_onoff_switch
name: Blah
- entity: switch.wenzhou_tkb_control_system_tz56_wall_switch_onoff_switch2
name: Blah 2
- entity: light.level
name: Blah 3
jhhbe
November 11, 2018, 9:08pm
3
That is what I thought as well, but then I was reading too fast. I missed using keyword entity though was puzzled when the documentation said “if you make it an object” and I had no idea what that meant.
Thx - I totally missed that!
Jhh
petro
(Petro)
November 11, 2018, 9:12pm
4
The - indicates the start of the object and at that point it expects keywords for every item until the next -. That’s how yaml works for defining objects with attributes. Example: you have 2 apples that you want to place in a bag. Each apple has a unique color and stem length. In yaml:
apples:
- color: yellow
length: 1
- color: blue
length: 5
1 Like
petro
(Petro)
November 11, 2018, 9:17pm
5
I’m trying to post from my phone and it’s a pita.