{"id":3759,"date":"2023-04-22T08:23:37","date_gmt":"2023-04-22T06:23:37","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=3759"},"modified":"2026-01-02T17:02:20","modified_gmt":"2026-01-02T15:02:20","slug":"creer-une-tuile-dediee-aux-piles-des-capteurs","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/creer-une-tuile-dediee-aux-piles-des-capteurs","title":{"rendered":"Create a tile dedicated to the batteries of the sensors"},"content":{"rendered":"<p><!--more--><\/p>\r\n<p>My aim was to:<\/p>\r\n<ul>\r\n<li>That the tile updates itself (e.g. when adding new sensors)<\/li>\r\n<li>Ignore sensors that are not on battery or remain blocked at 100%<\/li>\r\n<li>To have a rather understandable sensor name<\/li>\r\n<li>Have colors so that weak or dead batteries are easily identified<\/li>\r\n<li>Classify batteries in order of \"fatigue\"<\/li>\r\n<\/ul>\r\n<h3>tile code<\/h3>\r\n<pre><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3771\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/code.png\" alt=\"\" width=\"481\" height=\"322\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/code.png 481w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/code-300x201.png 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><br \/>Type: custom:auto-entities<br \/>card:<br \/> Type: entities<br \/> title: Control of batteries<br \/> state_color:<br \/>  green: '#00FF00'<br \/>  yellow: '#FFFF00'<br \/>  red: '#FF0000'<br \/>filter:<br \/> include:<br \/>  - entity_id: _battery<br \/>    state: &lt;100<br \/>Output:<br \/> Method: state<\/pre>\r\n\r\n\r\n\r\n<p>In the event of an error \u2018Custom element doesn\u2019t exist: auto-entities\", think about installing auto-entities in HACS<br \/><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-3956\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/autoentities.png\" alt=\"\" width=\"333\" height=\"227\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/autoentities.png 709w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/autoentities-600x410.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/04\/autoentities-300x205.png 300w\" sizes=\"auto, (max-width: 333px) 100vw, 333px\" \/><\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">&nbsp;<\/p>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":3760,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,166],"tags":[96],"class_list":["post-3759","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-home-assistant","category-retex","tag-batterie"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/3759","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/comments?post=3759"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/3759\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media\/3760"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=3759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=3759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=3759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}