{"id":3844,"date":"2023-05-04T19:59:09","date_gmt":"2023-05-04T17:59:09","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=3844"},"modified":"2026-01-02T17:02:13","modified_gmt":"2026-01-02T15:02:13","slug":"utilisation-de-la-carte-decluttering-card","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/de\/utilisation-de-la-carte-decluttering-card","title":{"rendered":"Verwendung der Decluttering Card"},"content":{"rendered":"<h3>Prinzip der Decluttering Card<\/h3>\r\n<p dir=\"auto\">Wir alle verwenden mehrmals den gleichen konfigurationsblock in unserer lovelace-konfiguration und wir wollen nicht jedes mal, wenn wir etwas \u00e4ndern m\u00f6chten, an hundert orten in unserer konfiguration die gleichen dinge \u00e4ndern.<\/p>\r\n<p dir=\"auto\">Diese Karte erm\u00f6glicht es Ihnen, dieselbe Konfiguration mehrmals in Ihrer Lovelace-Konfiguration wiederzuverwenden, um Wiederholungen zu vermeiden, und unterst\u00fctzt Variablen und Standardwerte.<!--more--><\/p>\r\n<h3 dir=\"auto\">Karten-Referenz\u00a0<\/h3>\r\n<p><a href=\"https:\/\/github.com\/custom-cards\/decluttering-card\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/custom-cards\/decluttering-card<\/a><\/p>\r\n<h3 dir=\"auto\">Definieren des Kartenmodells (in UI)<\/h3>\r\n<p dir=\"auto\">Die Deklaration des Modells erfolgt durch Hinzuf\u00fcgen eines Blocks <code>decluttering_templates:<\/code><\/p>\r\n<p dir=\"auto\">Um es hinzuzuf\u00fcgen: 3-Punkt-Men\u00fc oben rechts =&gt; Dashboard bearbeiten =&gt; RE 3-Punkt-Men\u00fc oben rechts =&gt; Konfigurations-Editor.<br \/>Der Block muss vorher platziert werden.<strong> Views:<\/strong><\/p>\r\n<p dir=\"auto\">F\u00fcr dieses Beispiel habe ich es sehr einfach gemacht, ich verwende nur eine Variable, es ist die Entity-ID der Zone, die als [[Zone]] angezeigt wird.<\/p>\r\n<pre>decluttering_templates:<br \/>  image_zone:<br \/>    Element:<br \/>      Typ: Bild<br \/>      entity: '[[Gebiet]]'<br \/>      Stil:<br \/>        width: 100%<br \/>        top: 50%<br \/>        left: 50%<br \/>      state_image:<br \/>        'wir': \/local\/home\/1920x1000\/[[zone]].png<br \/>        'off': \/local\/home\/1920x1000\/transparent.png<\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3851\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/decl1.png\" alt=\"\" width=\"544\" height=\"281\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/decl1.png 544w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/decl1-300x155.png 300w\" sizes=\"auto, (max-width: 544px) 100vw, 544px\" \/><\/p>\r\n<h3>Rufen Sie meine Vorlage Bild_zone decluttering Karte<\/h3>\r\n<p>Es gen\u00fcgt also, 4 statt 11 Zeilen zu verwenden, um die Karte eines Gebiets anzuzeigen. Da ich 12 Zonen habe, liegt das Interesse auf der Hand.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">- Typ: custom:decluttering-card template: image_zone Variablen: - Gebiet: light.lume_Zimmer_Eltern<\/pre>\r\n<h3>Edit \/ Bonus, Entwicklung\u00a0<\/h3>\r\n<p>Seit der Einf\u00fchrung des Tutorials habe ich meine Decluttering-Karten weiter verbessert, hier sind die Codes.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">decluttering_templates: image_zone: Element: Typ: Bild entity: '[[Zone]]' Stil: width: 100% top: 50% left: 50% state_image: 'wir': \/local\/home\/1920x1000\/[[zone]].png 'off': \/local\/home\/1920x1000\/transparent.png image_binary_sensor: default: Bonus: '' - bonusoff: '' - zoneoff: transparent element: Typ: Bild entity: '[[zone]]' tap_action: Ma\u00dfnahme: none Stil: width: 100% top: 50% left: 50% state_image: 'wir': \/local\/home\/1920x1000\/[[zone]][[bonuson]].png 'off': \/local\/home\/1920x1000\/[[zoneoff]][[bonusoff]].png image_lock: default: Bonus: '' - bonusoff: '' - zoneoff: transparent element: Typ: Bild entity: '[[zone]]' tap_action: Ma\u00dfnahme: none Stil: width: 100% top: 50% left: 50% state_image: locked: \/local\/home\/1920x1000\/[[zone]][[bonuson]].png unlocked: \/local\/home\/1920x1000\/[[zoneoff]][[bonusoff]].png<\/pre>\r\n<p>Und dann zu den Ansichten:<\/p>\r\n<ul>\r\n<li>F\u00fcr die Lichter<\/li>\r\n<\/ul>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">- Typ: custom:decluttering-card template: image_zone Variablen: - Gebiet: light.lume_chambre_parents - Typ: custom:decluttering-card template: image_zone Variablen: - Gebiet: light.ebeleuchtung_ treppe_korridor - typ: custom:decluttering-card template: image_zone Variablen: - Gebiet: light.lichter_de_la_salle_a_manger<\/pre>\r\n<ul>\r\n<li>F\u00fcr lock oder binary_sensor<\/li>\r\n<\/ul>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">- Typ: custom:decluttering-card template: image_lock Variablen: - Gebiet: lock.porte - zoneoff: lock.porte - bonuson: _close - bonusoff: _open - Typ: custom:decluttering-card template: image_binary_sensor Variablen: - Gebiet: binary_sensor.porte_dentree_contact - Typ: custom:decluttering-card template: image_binary_sensor Variablen: - Gebiet: binary_sensor.salle_de_bains_porte_contact - bonuson: _grise - Typ: custom:decluttering-card template: image_binary_sensor Variablen: - Gebiet: binary_sensor.volet_de_la_K\u00fcche_contact - zoneoff: binary_sensor.volet_de_la_K\u00fcche_contact - bonusoff: _close - Typ: custom:decluttering-card template: image_binary_sensor Variablen: - Gebiet: binary_sensor.petit_volet_de_la_salle_a_manger_contact - zoneoff: binary_sensor.petit_volet_de_la_salle_a_manger_contact - bonusoff: _close - Typ: custom:decluttering-card template: image_binary_sensor Variablen: - Gebiet: binary_sensor.grand_volet_de_la_salle_a_manger_contact - zoneoff: binary_sensor.grand_volet_de_la_salle_a_manger_contact - bonusoff: _close<\/pre>\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Principe de Decluttering Card Nous utilisons tous plusieurs fois le m\u00eame bloc de configuration dans notre configuration lovelace et nous ne voulons pas changer les m\u00eames choses \u00e0 cent endroits dans notre configuration \u00e0 chaque fois que nous voulons modifier quelque chose. Cette carte vous permet de r\u00e9utiliser plusieurs fois la m\u00eame configuration dans votre [&hellip;]<\/p>","protected":false},"author":1,"featured_media":3851,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,166],"tags":[81],"class_list":["post-3844","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-home-assistant","category-retex","tag-developpement"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/3844","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/comments?post=3844"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/3844\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media\/3851"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media?parent=3844"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/categories?post=3844"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/tags?post=3844"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}