{"id":5170,"date":"2023-10-07T16:04:07","date_gmt":"2023-10-07T14:04:07","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=5170"},"modified":"2026-01-02T16:57:06","modified_gmt":"2026-01-02T14:57:06","slug":"jajoute-un-gif-anime-transparent-a-mon-dashboard-ha","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/es\/jajoute-un-gif-anime-transparent-a-mon-dashboard-ha","title":{"rendered":"A\u00f1ado un gif animado transparente a mi HA Dashboard"},"content":{"rendered":"<h3>Mi objetivo<\/h3>\r\n<p>Mi objetivo es hacer una animaci\u00f3n a trav\u00e9s de un gif animado.<\/p>\r\n<p>Puedo cambiar el gif dependiendo del estado de una entidad.<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/jusaucompteur.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5171\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/jusaucompteur.gif\" alt=\"\" width=\"467\" height=\"459\" \/><\/a><!--more--><\/p>\r\n<h3>Dibujar\u00e9 las dos bolas (una roja y otra azul)<\/h3>\r\n<p>Una peque\u00f1a toma de Photoshop u otro y aqu\u00ed est\u00e1 el archivo b\u00e1sico<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/2boules.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5175\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/2boules.png\" alt=\"\" width=\"36\" height=\"16\" \/><\/a><\/p>\r\n<h3>Voy a crear la animaci\u00f3n en Canva<\/h3>\r\n<p>Como mi versi\u00f3n de photoshop es antigua, no tengo la funcionalidad de edici\u00f3n en casa, uso Canva (en l\u00ednea).<\/p>\r\n<p>Para evitar una marca blanca al girar, pongo la parte inferior de mi pantalla HA en el fondo, el resultado es:<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/resultatCanva.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-5176\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/resultatCanva.gif\" alt=\"\" width=\"102\" height=\"255\" \/><\/a><\/p>\r\n<h3>Voy a rockear sobre un fondo transparente<\/h3>\r\n<p>No he podido averiguar c\u00f3mo hacerlo con Canva, utilizo una herramienta en l\u00ednea<\/p>\r\n<ul>\r\n<li><a href=\"https:\/\/onlinegiftools.com\/remove-gif-background\" target=\"_blank\" rel=\"noopener\">https:\/\/onlinegiftools.com\/remove-gif-background<\/a><\/li>\r\n<\/ul>\r\n<p>El resultado es\u00a0<\/p>\r\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/anime8.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-5177\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/anime8.gif\" alt=\"\" width=\"105\" height=\"263\" \/><\/a><\/p>\r\n<h3>Hago otras dos animaciones<\/h3>\r\n<p>Para tener tres estados, genero otros dos archivos, uno m\u00e1s r\u00e1pido y otro m\u00e1s lento, as\u00ed que tres archivos en total:<\/p>\r\n<table style=\"border-collapse: collapse; width: 100%;\">\r\n<tbody>\r\n<tr>\r\n<td style=\"width: 33.3333%;\"><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/rapide-1.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5182\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/rapide-1.gif\" alt=\"\" width=\"400\" height=\"1000\" \/><\/a><\/td>\r\n<td style=\"width: 33.3333%;\"><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/moyenne.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5183\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/moyenne.gif\" alt=\"\" width=\"400\" height=\"1000\" \/><\/a><\/td>\r\n<td style=\"width: 33.3333%;\"><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/lente.gif\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5184\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/10\/lente.gif\" alt=\"\" width=\"400\" height=\"1000\" \/><\/a><\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<h3>A\u00f1ado una plantilla que coincidir\u00e1 con la potencia consumida\u00a0<\/h3>\r\n<p>En mi archivo templates.yaml, agrego<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">- nombre: Consumo _Velocidad \u00fanica _id: Sensor.consumo _speed state: &gt;- {% (states('sensor.linky_power_apparent')|float) &lt; 400 %} lento {% elif (states('sensor.linky_apparent _power')|float) &gt;4000 %} r\u00e1pido {% de lo contrario %} promedio {% endif %} <\/pre>\r\n<p>A\u00f1ado en el salpicadero una tarjeta que mostrar\u00e1 uno de los 3 gif animados, dependiendo del valor del sensor.consumo _speed.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">- tipo: entidad de imagen: sensor.consumo _speed tap_action: acci\u00f3n: estilo ninguno: anchura: 7% parte superior: 91.6% izquierda: 26.7% _imagen del estado: lentitud: \/local\/home\/Conso\/lente.gif media: gif de \/local\/home\/Conso\/medium.fast: \/local\/home\/Conso\/fast.gif<\/pre>\r\n<p>\u00a0<\/p>","protected":false},"excerpt":{"rendered":"<p>Mi objetivo es hacer una animaci\u00f3n a trav\u00e9s de un gif animado. Podr\u00e9 cambiar mi gif dependiendo del estado de una entidad.<\/p>","protected":false},"author":1,"featured_media":0,"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-5170","post","type-post","status-publish","format-standard","hentry","category-domotique","category-home-assistant","category-retex","tag-developpement"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/posts\/5170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/comments?post=5170"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/posts\/5170\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/media?parent=5170"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/categories?post=5170"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/es\/wp-json\/wp\/v2\/tags?post=5170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}