Hi,
inspired by Frenck I have started recently to develop a new Home Assistant configuration split up in small modular elements. However, I am stuck for the last some days at a point with the Picture-Elements card where I cannot make any progress and II hope that I find some expert help around here
This might look a bit complex at the beginning but bear with me, it is actually intended to simplify the structure of the Home Assistant configuration.
It starts with a dashboard called “Development Environment” in the devenv.yaml file:
title: Zuhause
button_card_templates: !include ../button_card_templates/button_card_templates.yaml
decluttering_templates: !include ../decluttering_templates/decluttering_templates.yaml
views: !include_dir_list ./views
This file calls the files in the view directory in which I have a file called 020_arbeitszimmer.yaml:
panel: true
path: arbeitszimmer
icon: mdi:desk
cards:
- type: picture-elements
image: /local/pictures/ha_wallpaper7.jpg
elements:
- type: custom:decluttering-card
template: test_light
As shown above I am using a picture-elements card which shows an image on which I intend to show button-cards. As these button-cards will be repeatedly used throughout the implementation I have used decluttering-card to have a standard code for this type of button.
All decluttering cards are in a folder called decluttering-templates, in which there is the file decluttering_templates.yaml listing all existing decluttering files so far:
lighttemplate:
!include lighttemplate.yaml
temperature_line:
!include temperature_line.yaml
style_screensetup:
!include style_screensetup.yaml
room_setup:
!include room_setup.yaml
generic_button:
!include generic_button.yaml
test_light:
!include test_light.yaml
From there I am calling the test_light.yaml:
- type: custom:button_card
entity: light.az_schreibtisch
icon: mdi:lamp
title: Schreibtisch
show_state: true
styles:
top: 25%
left: 47%
width: 90vw
BUT, that does not work
The error message says that I have to define a card or an element. However, I have defined an element as far as I can see I have already played around with all sorts of indentations, etc. but that did not help
(The error message, by the way, only appears at the very edge and is not full shown - there is a thing with those error messages, I think )
But of course, the error sits in front of the keyboard but I cannot get it to work.
If anybody has any idea - I would very much appreciate it!
Thanks!