{"id":7166,"date":"2024-05-18T10:25:48","date_gmt":"2024-05-18T08:25:48","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=7166"},"modified":"2026-01-04T21:25:23","modified_gmt":"2026-01-04T19:25:23","slug":"aide-memoire-test-de-cartes-home-assistant","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/de\/aide-memoire-test-de-cartes-home-assistant","title":{"rendered":"Speicherhilfe Testen von Home Assistant-Karten"},"content":{"rendered":"<h2>Mein Ziel<\/h2>\r\n<p>Diese Seite dient mir als Merkblatt, kann aber f\u00fcr andere n\u00fctzlich sein.<\/p>\r\n<p>Ich m\u00f6chte \u00c4nderungen an Home Assistant-Karten testen, um Entwicklern Verbesserungen anzubieten.<\/p>\r\n<p>Auf dieser Seite werde ich eine Karte aus der Kartenserie von Pronote delphiki bearbeiten.<!--more--><\/p>\r\n<h2>Organisieren von Dateien im Home Assistant<\/h2>\r\n<p>Karten sind JavaScript-Skripte, die grunds\u00e4tzlich in \/homeAssistant\/www\/community gespeichert werden.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7168\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes.png\" alt=\"\" width=\"352\" height=\"625\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes.png 352w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes-169x300.png 169w\" sizes=\"auto, (max-width: 352px) 100vw, 352px\" \/><\/a><\/p>\r\n<p>In diesen Ordnern finden wir die JS-Datei und ihre in GZ komprimierte Version.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7169\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes2.png\" alt=\"\" width=\"562\" height=\"154\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes2.png 562w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes2-300x82.png 300w\" sizes=\"auto, (max-width: 562px) 100vw, 562px\" \/><\/a><\/p>\r\n<h2>Organisieren von Dateien auf GitHub<\/h2>\r\n<p>Ich nehme daher das Beispiel des <a href=\"https:\/\/github.com\/delphiki\/lovelace-pronote\" target=\"_blank\" rel=\"noopener\">Hinterlegung von Pronote-Karten<\/a>.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7170\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes3.png\" alt=\"\" width=\"707\" height=\"172\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes3.png 707w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes3-600x146.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes3-300x73.png 300w\" sizes=\"auto, (max-width: 707px) 100vw, 707px\" \/><\/a><\/p>\r\n<p>Die Quelldateien der Karten befinden sich in lovelace-xx\/src\/cards.<\/p>\r\n<h2>Ich stelle eine JS-Kartendatei wieder her und lege sie auf mein HA<\/h2>\r\n<p>In meinem Beispiel des Tages werde ich die Karte zur\u00fcckbekommen <a class=\"Link--primary\" title=\"abwesend-card.js\" href=\"https:\/\/github.com\/delphiki\/lovelace-pronote\/blob\/main\/src\/cards\/absences-card.js\" target=\"_blank\" rel=\"noopener\" aria-label=\"abwesend-card.js, (File)\">abwesend-card.js<\/a> und ich lege es in den Ordner \/homeAssistant\/www\/community\/lovelace-pronote\/cards meines HA.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7171\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes4.png\" alt=\"\" width=\"372\" height=\"65\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes4.png 372w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes4-300x52.png 300w\" sizes=\"auto, (max-width: 372px) 100vw, 372px\" \/><\/a><\/p>\r\n<h2>Ich muss diese Karte als Ressource in HA deklarieren<\/h2>\r\n<p>Unter Einstellungen \/ Dashboards \/ Ressourcen (3 Punkte oben rechts) klicke ich auf<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7172\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes5.png\" alt=\"\" width=\"248\" height=\"61\" \/><\/a><\/p>\r\n<p>Ich f\u00fcge daher meine JS-Datei hinzu: \/hacsfiles\/lovelace-pronote\/cards\/sans-card.js<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7173\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes6.png\" alt=\"\" width=\"611\" height=\"472\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes6.png 611w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes6-600x464.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes6-300x232.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/a><\/p>\r\n<p>Es ist vorbei, zu diesem Zeitpunkt wird die Karte auf dem Dashboard funktionieren.<\/p>\r\n<p>Ich habe mich gefragt, ob die pronote.js-Karte aus den Ressourcen entfernt werden sollte, um die neue Karte zu testen, um Doppelmeldungen zu vermeiden. Offensichtlich nein, es ist die Nachricht, die ber\u00fccksichtigt wird. Ich wei\u00df nicht, wie HA mit der Priorit\u00e4t von JS-Codes umgeht, ich werde diesen Absatz erg\u00e4nzen, wenn ich es verstehe.<\/p>\r\n<h2>Ich teste eine Abwesenheitskarte auf dem Dashboard<\/h2>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">Typ: custom:pronote-abwesend-card entity: sensor.pronote_xx_coralie_Abwesenheiten display_header: true child_name: Coralie<\/pre>\r\n<p>Es funktioniert:<a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7174\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes7.png\" alt=\"\" width=\"700\" height=\"241\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes7.png 700w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes7-600x207.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes7-300x103.png 300w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\r\n<h2>Ich mache einen Modifikationstest<\/h2>\r\n<p>Ich mache einen \u00c4nderungstest, um sicherzustellen, dass mein Abwesenheits-card.js-Code derjenige ist, der die Karte generiert.<\/p>\r\n<p>Ich bearbeite die Datei Abwesenheits-card.js und \u00e4ndere die Zeile<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">&lt;ha-icon icon=\"mdi:check\"&gt;&lt;\/ha-icon&gt;<\/pre>\r\n<p>durch die Linie<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"js\">&lt;ha-icon icon=\"mdi:account-school-outline\"&gt;&lt;\/ha-icon&gt;<\/pre>\r\n<p>um das Abwesenheits H\u00e4kchen zu \u00e4ndern.<\/p>\r\n<p><em><strong>Wichtig<\/strong><\/em> !!!! Man muss die JS-Datei aktualisieren, die im Browser zwischengespeichert ist, also muss man sie \u00f6ffnen und ein kleines F5 machen.<\/p>\r\n<p>In einem anderen Browserfenster \u00f6ffne ich die Datei:<\/p>\r\n<p>http:\/\/homeassistant.local:8123\/hacsfiles\/lovelace-pronote\/cards\/absences-card.js<\/p>\r\n<p>Ich kehre zu meiner Registerkarte Pronote zur\u00fcck und aktualisiere die Seite, das H\u00e4kchen hat sich ge\u00e4ndert:<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-7177\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/cartes8.png\" alt=\"\" width=\"218\" height=\"237\" \/><\/a><\/p>\r\n<h2>So kann ich den Code \u00e4ndern<\/h2>\r\n<p>An diesem Punkt kann ich den Code der JS-Datei \u00e4ndern, die die Karte generiert.<\/p>\r\n<p>Also, wenn ich den Entwicklern Verbesserungen vorschlagen kann, anstatt \u2026 zu spielen<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-7178\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon.jpg\" alt=\"\" width=\"243\" height=\"243\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon.jpg 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon-300x300.jpg 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon-100x100.jpg 100w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon-600x600.jpg 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon-150x150.jpg 150w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2024\/05\/yaquafautquon-768x768.jpg 768w\" sizes=\"auto, (max-width: 243px) 100vw, 243px\" \/><\/a><\/p>\r\n<p>Jede \u00c4hnlichkeit mit bestehenden oder bestehenden Personen ist rein zuf\u00e4llig und unbeabsichtigt. \ud83e\udd73<\/p>\r\n<p>&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"<p>Mein Ziel Diese Seite dient mir als Merkblatt, kann aber f\u00fcr andere n\u00fctzlich sein. Ich m\u00f6chte \u00c4nderungen an Home Assistant-Karten testen, um Entwicklern Verbesserungen anzubieten. Auf dieser Seite werde ich eine Karte aus der Kartenserie von Pronote delphiki bearbeiten.<\/p>","protected":false},"author":1,"featured_media":7167,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,166],"tags":[],"class_list":["post-7166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-retex"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/7166","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=7166"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/7166\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media\/7167"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media?parent=7166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/categories?post=7166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/tags?post=7166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}