Afin de refléter au mieux notre domotique, chacun de nous essaie de trouver l’icône parfaite pour chaque entité.
Il y a bien évidemment la base des icones qui est https://materialdesignicons.com/.
Mais si nous ne trouvons pas notre bonheur ?
Il y a des modules qui permettent d’utiliser des icones qui ne sont pas disponible de façon native (mdi:<ICONE>)
.
Il y a l’intégration hass-fontawesome qui permet d’ajouter les icones de Font Awesome (+1600).
Et si ça ne suffit pas, il y a aussi des dépôts beaucoup plus modeste, comme par exemple (disponible dans HACS) :
Pourquoi vous présenter celui-ci ?
Parce que j’ai contribué récemment à ajouter des icones que j’utilisais afin de les rendre disponible à tous.
C’est parti pour la présentation.
Ce dépôt est disponible nativement dans HACS :
Après l’avoir installé et rechargé le cache (CTRL+F5 ou CTRL+SHIFT+R), vous pouvez maintenant afficher les icones de la bibliothèque de la manière suivante :
entities:
- entity: light.floor_lamp
icon: 'bha:floor-lamp'
name: Plafonnier
show_header_toggle: false
title: Icônes bha
type: entities
Comme vous pouvez le constater, les icônes de cette librairie s’appellent avec bha:<ICONE>
(bh sont les initiales du développeur Borre Haugen avec la compression de Home Assisant)
Voilà vous avez des nouvelles icônes à votre disposition
Si vous souhaitez utiliser ces icônes partout dans Home Assistant et non pas seulement dans les cartes et tableaux de bord (principalement dans la barre latérale), sachez que vous devez ajouter manuellement ces lignes au fichier configuration.yaml
:
#configuration.yaml
frontend:
extra_module_url:
- /hacsfiles/hass-bha-icons/hass-bha-icons.js
… … …
C’est tout ?
Ah ! Vous en voulez plus ? Pas de soucis
Il est frustrant de ne pas trouver l’icône parfaite car elle n’existe que notre imagination.
Et bien qu’à cela ne tienne ! Et si on créait nous même notre propre icône ?
Pour cela, commençons par récupérer un des fichiers .svg
depuis le dépot de bha
: (celling-fan.svg par exemple).
Maintenant, sois vous passer par un éditeur en ligne pour ouvrir, modifier ce svg en remplaçant l’icône présente par votre icône personnelle, soit vous utiliser le logiciel gratuit INKSCAPE.
Je ne vais pas vous montrer comment dessiner avec inkscape, je vous laisse regarder les nombreuses vidéos disponibles sur YouTube ou depuis la FAQ de Inkscape, mais c’est par lui que je travaille personnellement.
Les icônes utilisées sous HA sont des svg composées d’un seul et unique chemin, il faut donc combiner tous vos chemins en un seul (voir le paragraphe Subpaths & Combining)
La taille des icônes est de 24px par 24px dans la plupart des affichages de Lovelace. Ce qui veux dire que plus vous aurez de détail dans votre icône, moins on les verra dans ce format.
Vous pouvez tout à fait mettre une tonne de détails mais n’espérez pas avoir un joli rendu dans l’affichage nominal 24x24 (par contre dans une carte affichant l’icône en grand, vous aurez un bon rendu)
trop de détail pour un affichage 24x24
moins de détail pour un affichage 24x24
Une fois votre fichier svg ne contenant qu’un chemin sauvegardé, vous pouvez l’ouvrir avec un éditeur de texte tel que Notepad afin d’y récupérer le chemin qui est dans la clé d="<CHEMIN>"
.
Maintenant que vous avez le chemin de votre icône, il va falloir l’ajouter dans Lovelace.
Comment ? En utilisant le même principe en dupliquant le module bha
.
Récupérez le fichier javascript utiliser par le module bha
.
Ouvrez le et remplacez :
BHA_ICONS_MAP
par ce que vous voulez (sans espace, ni tiret, et essayez de garder le formalisme en majuscule) par exemple :ICONES_HACF
bha
par ce que vous voulez (sans espace) par exemple :hacf
(donc vous appellerez vos icônes avechacf:<ICONE>
Ce qui donne :
Sauvegardez le fichier sous un autre nom par exemple : hacf-icons.js
Ajoutez le fichier hacf-icons.js
dans le répertoire www
.
Ajoutez le fichier comme ressource dans votre tableau de bord (j’ai mis le fichier dans un dossier icons
):
/local/icons/hacf-icons.js?v=1
On a presque fini, il reste juste le fait de mettre vos propres icônes dans le fichier hacf-icon.js
Ouvrez donc le fichier et supprimez toutes les déclarations d’icônes (de bha
) et ajouter les vôtres.
Sauvegardez.
Comme vous venez de modifier le fichier hacf-icon.js
, il faut indiquer à HA de le recharger.
Pour cela, retournez dans la déclaration de la ressource et modifier simplement le nombre en fin de chemin de la ressource :
/local/icons/hacf-icons.js?v=1
en/local/icons/hacf-icons.js?v=2
Actualisez la vue de votre navigateur.
Incrémentez le nombre à chaque modification du fichier (1 puis 2, 3 etc ou 1 puis 1.0, 1.1, etc)
Il ne vous reste plus qu’à essayer d’appeler une icône de votre création :
mickey-icons.js (bha modifié)
const ICONES_HACF = {
'mickey-coeur':'m 5.064903,7.1777819 c 0,0 0.3360435,-0.8520346 0.3360435,-0.8520346 0,0 0.5071309,-1.056523 0.5071309,-1.056523 0.144504,-0.2985536 0.2624256,-0.6516359 0.5214448,-0.8748689 0.3288861,-0.2838979 0.7279777,-0.2082375 1.0551601,0.032723 0.4103389,0.3023017 0.6468642,0.8152271 0.6475452,1.3192904 0,0 -0.071227,1.3291736 -0.071227,1.3291736 0,0 -0.030676,0.3748955 -0.030676,0.3748955 -0.00276,0.1383697 -0.070203,0.4641881 0,0.5684773 0.071237,0.1046299 0.4249941,0.046352 0.5449611,0.030676 0.363989,-0.048051 0.827497,0.055899 1.158767,0.2113052 0.5674554,0.2661757 1.0527734,0.6652694 1.5336624,1.0612944 0,0 0.511221,0.3997751 0.511221,0.3997751 0.06884,0.052829 0.190173,0.1564337 0.27265,0.1744967 0.110423,0.024199 0.190856,-0.052481 0.272652,-0.1141725 0,0 0.545301,-0.4232909 0.545301,-0.4232909 0.583474,-0.4628252 1.30191,-1.0998075 2.044884,-1.2606708 0.405228,-0.087588 0.47339,-0.052829 0.852035,-0.034421 0.101565,0.00481 0.283896,0.048051 0.361263,-0.020792 0.07361,-0.065773 0.05078,-0.1963088 0.04806,-0.2859434 0,0 -0.05896,-0.7497908 -0.05896,-0.7497908 0,0 -0.04669,-0.7497898 -0.04669,-0.7497898 0,0 -0.03101,-0.3748964 -0.03101,-0.3748964 -0.0025,-0.5173539 0.133258,-0.9583681 0.511562,-1.3278087 0.218462,-0.2133507 0.471346,-0.3568334 0.783533,-0.3408149 0.346607,0.01807 0.587562,0.3288851 0.738884,0.6121016 0,0 0.428744,0.9201977 0.428744,0.9201977 0.223232,0.4611206 0.464529,0.936557 0.604603,1.4314174 0,0 0.06817,0 0.06817,0 0.225277,-0.5660912 0.492135,-1.4631128 1.295092,-1.271916 0.106676,0.02556 0.185403,0.064412 0.272651,0.1312133 0.402159,0.3087766 0.419882,0.8820263 0.511221,1.3451923 0,0 0.297531,1.704068 0.297531,1.704068 0,0 0.254928,1.6018263 0.254928,1.6018263 0.08486,0.40182 0.207215,0.853737 0.378303,1.22693 0,0 0.817953,1.704069 0.817953,1.704069 0.130192,0.365353 0.219485,0.738203 0.255952,1.124686 0,0 0,0.545302 0,0.545302 0.04534,0.163932 0.199376,0.333998 0.295144,0.47714 0.146211,0.21846 0.26345,0.516333 0.249136,0.783871 -0.01876,0.354439 -0.165648,0.685371 -0.338782,0.988353 -0.380348,0.665269 -0.980863,1.262375 -1.630793,1.667944 -0.526218,0.328205 -1.14343,0.588585 -1.772233,0.581427 -0.30571,-0.0038 -0.562002,-0.09475 -0.719117,-0.374894 -0.119967,-0.214372 -0.113491,-0.447829 -0.304688,-0.525194 -0.09952,-0.03988 -0.392617,-0.0484 -0.509857,-0.05998 0,0 -0.886116,-0.105648 -0.886116,-0.105648 0,0 -1.22693,-0.243682 -1.22693,-0.243682 -0.256293,-0.05692 -0.519401,-0.132236 -0.783872,-0.120648 -0.663906,0.02897 -1.163881,0.693897 -1.874477,0.893274 -0.356492,0.100204 -0.778418,0.133598 -1.124685,-0.02046 -0.280831,-0.124736 -0.413748,-0.327862 -0.545302,-0.323772 -0.08691,0.0031 -0.282877,0.179949 -0.374896,0.235843 -0.212668,0.129168 -0.466233,0.199376 -0.71571,0.199376 -0.344904,0 -0.795799,-0.144163 -1.0906024,-0.319343 -0.509513,-0.302985 -0.921898,-0.724912 -1.567739,-0.660499 0,0 -1.0224419,0.218463 -1.0224419,0.218463 0,0 -0.9883599,0.170407 -0.9883599,0.170407 0,0 -0.6816277,0.07941 -0.6816277,0.07941 -0.1175808,0.0082 -0.4089769,0.01635 -0.509517,0.05726 -0.1929006,0.07941 -0.1683626,0.33468 -0.3128666,0.559276 C 4.6197979,19.761317 4.3134054,19.791651 3.9742953,19.7879 3.5953141,19.783501 3.0854563,19.589882 2.7473684,19.421522 1.9611119,19.029245 1.2593758,18.427367 0.79825323,17.67485 c -0.2596997,-0.423972 -0.4082955,-0.722183 -0.402502,-1.226929 0.00686,-0.563366 0.3827343,-0.798186 0.5037235,-1.090605 0.06475,-0.156775 0.039537,-0.499634 0.041584,-0.681628 0.011245,-0.936557 0.63527857,-1.83835 1.01187767,-2.658349 C 2.0647237,11.773658 2.1560619,11.5235 2.2354713,11.26755 2.4910822,10.441076 2.6781881,8.6490765 2.8768831,7.6549221 2.9535636,7.2708248 3.037066,6.5206943 3.2514378,6.2235046 3.3315256,6.1127395 3.4102567,6.0425319 3.5312449,5.9787993 c 0.8176132,-0.4290844 1.2947524,0.56507 1.465501,1.1989836 0,0 0.068157,0 0.068157,-1e-6 z M 4.3832753,11.676525 c -0.048051,-0.217779 0.029305,-0.442035 0.1039485,-0.647546 0.1768829,-0.486341 0.5163338,-0.967913 0.8844124,-1.3288333 0,0 1.2920255,-1.0912871 1.2920255,-1.0912871 0.5763153,-0.6046023 0.7910289,-1.2657808 0.848967,-2.0786238 0,0 -0.027944,-0.4771381 -0.027944,-0.4771381 C 7.4839507,5.697969 7.4857076,5.3561319 7.3149579,5.0306542 7.0886573,4.5998661 6.7386416,4.5872559 6.4462233,4.9624869 6.3177359,5.1274401 6.2478701,5.3486296 6.1691421,5.5418708 c 0,0 -0.3469491,0.7838714 -0.3469491,0.7838714 0,0 -0.6652683,1.4995806 -0.6652683,1.4995806 0,0 -0.8009122,1.8403955 -0.8009122,1.8403955 -0.1748375,0.4369237 -0.3104813,0.7944367 -0.5749533,1.1928487 -0.050445,0.076 -0.1915375,0.340473 -0.3063925,0.275718 -0.083495,-0.04737 -0.043968,-0.172111 -0.02249,-0.241637 0,0 0.2222118,-0.579384 0.2222118,-0.579384 0,0 0.4451019,-1.0224401 0.4451019,-1.0224401 C 4.3311359,8.8535588 4.5717504,8.3948234 4.5523244,7.893486 4.5390327,7.5506278 4.35806,7.0073699 4.2036717,6.7006376 4.0956334,6.4866065 3.9572627,6.3069978 3.7019935,6.4624083 3.4528587,6.6140707 3.3693594,6.9426161 3.3240315,7.2118594 c 0,0 -0.1087207,0.8520345 -0.1087207,0.8520345 0,0 -0.1884699,1.0224405 -0.1884699,1.0224405 -0.1997172,0.9992666 -0.3616027,2.1253166 -0.7429741,3.0673246 -0.2961674,0.731047 -0.8438549,1.352009 -0.9931322,2.147127 -0.050097,0.267881 -0.078389,0.613466 -0.077028,0.886118 0.00235,0.517355 0.1867662,0.81284 0.2044885,1.192847 0,0 -0.68162867,-0.340813 -0.68162867,-0.340813 -0.099181,0.352745 0.1639289,0.889868 0.34115247,1.192852 0.4757773,0.813181 1.0111952,1.230679 1.8400548,1.644427 0.2712887,0.135302 0.7177546,0.324454 1.0224424,0.320705 0.1980125,-0.0025 0.4362419,-0.132918 0.3932992,-0.363308 -0.023514,-0.1261 -0.1567745,-0.269583 -0.2314127,-0.374894 -0.047713,-0.0668 -0.1949459,-0.245728 -0.052143,-0.293101 0.06918,-0.02318 0.4284029,0.0484 0.5378041,0.05318 0.5964237,0.02624 0.9491663,0.09987 1.5677438,0.02591 0.5442791,-0.06543 0.9358735,-0.15064 1.4314174,-0.398412 0,0 0.5078124,-0.277082 0.5078124,-0.277082 0.099519,-0.07294 0.1502992,-0.169385 0.2150542,-0.185743 0.07361,-0.01874 0.14246,0.04056 0.197332,0.08044 0,0 0.443057,0.313206 0.443057,0.313206 0.421587,0.277764 1.1870545,0.753541 1.6699885,0.852036 0.273672,0.05555 0.644137,0.03442 0.829881,-0.207897 0.09986,-0.130532 0.124056,-0.314229 0.124056,-0.473732 0,-0.636301 -0.521785,-1.036075 -1.0221,-1.328834 C 9.1512595,15.799007 7.2951861,15.674611 6.7127366,13.925894 6.633672,13.688347 6.5753881,13.324358 6.5658445,13.07386 c -0.00614,-0.15439 0.011931,-0.199717 0.027269,-0.340814 0.1179216,-1.104578 0.7184351,-1.884701 1.743605,-2.327077 0.354104,-0.152684 0.475776,-0.171771 0.852034,-0.202784 0.07463,-3.14e-4 0.20108,-0.03033 0.270266,0 0.233797,0.08759 -0.109062,0.464869 0,0.633913 0.04396,0.06203 0.236184,0.147231 0.309117,0.183357 0.2746975,0.136667 0.6853775,0.341837 0.9883605,0.348995 0.316616,0.0072 0.846581,-0.165296 0.875891,-0.544962 0.01636,-0.215395 -0.172793,-0.492475 -0.306733,-0.647546 C 11.106171,9.9237165 10.570411,9.5597267 10.279356,9.3583068 9.8168725,9.0379411 9.2470325,8.5734112 8.6775315,8.5171778 8.3551225,8.4851406 7.7477924,8.6862208 7.4506018,8.8215239 6.5610793,9.226411 5.8654775,9.7110484 5.2506491,10.483674 4.9670919,10.840165 4.7220468,11.406938 4.3832774,11.676522 Z m 18.3698667,4.703231 c 0,0 0.155071,-0.681627 0.155071,-0.681627 0.0627,-0.310481 0.04976,-0.441695 0.04941,-0.74979 -0.002,-1.248742 -0.665608,-1.807336 -1.083787,-2.862837 -0.376939,-0.951893 -0.57802,-2.3107181 -0.783871,-3.3399763 0,0 -0.133599,-0.7497898 -0.133599,-0.7497898 -0.046,-0.3421778 -0.06816,-0.8080707 -0.180626,-1.1246862 -0.06817,-0.1925598 -0.265495,-0.5129244 -0.51054,-0.4611206 -0.273332,0.057935 -0.41,0.5657505 -0.488386,0.8019354 -0.12542,0.3759166 -0.125761,0.4284019 -0.125079,0.817953 6.29e-4,0.4597566 0.158819,0.7235471 0.348311,1.1246852 0,0 0.426019,0.9542793 0.426019,0.9542793 0,0 0.314912,0.817952 0.314912,0.817952 0.02045,0.07668 0.04464,0.265834 -0.09917,0.221871 -0.09304,-0.02829 -0.250157,-0.303325 -0.306733,-0.392277 -0.248795,-0.392959 -0.408977,-0.8309039 -0.581088,-1.2610115 0,0 -0.550073,-1.2610116 -0.550073,-1.2610116 0,0 -0.938943,-2.113045 -0.938943,-2.113045 -0.152345,-0.331612 -0.410341,-1.1045778 -0.661181,-1.3111118 -0.249134,-0.2051709 -0.501337,-0.1393929 -0.67515,0.1182624 -0.192561,0.2862841 -0.241297,0.7167314 -0.241979,1.056524 0,0 0,0.6475461 0,0.6475461 0.001,0.6523174 0.30196,1.4024489 0.751154,1.874475 0.793074,0.8332901 1.550361,1.075951 2.120203,2.2152904 0.103268,0.206875 0.234479,0.520423 0.262086,0.74945 0.02182,0.182334 -0.06611,0.194264 -0.176882,0.06577 -0.103268,-0.119284 -0.254588,-0.36774 -0.3432,-0.508494 C 18.66031,10.014033 17.804527,9.2564057 16.686658,8.8000554 16.380607,8.6753171 15.858479,8.4916195 15.527891,8.5178611 c -0.46044,0.036805 -0.821703,0.2985526 -1.192849,0.5456431 -0.478162,0.318662 -1.157065,0.7583112 -1.527528,1.1816008 -0.15541,0.177566 -0.312867,0.474073 -0.219484,0.715711 0.113831,0.294804 0.543257,0.41511 0.826813,0.408635 0.327182,-0.0079 0.664587,-0.18813 0.95428,-0.331953 0.06918,-0.03442 0.278445,-0.123374 0.320365,-0.168702 0.168022,-0.180632 -0.243683,-0.658453 0.123375,-0.681287 0,0 0.203806,0.02045 0.203806,0.02045 0.433516,0.0317 0.746382,0.123033 1.124687,0.344221 0.462484,0.270607 0.832608,0.591653 1.109348,1.056183 0.509516,0.855102 0.460441,2.055447 -0.05044,2.896918 -0.643798,1.060954 -2.171667,1.407562 -3.240118,1.93446 -0.595402,0.29344 -1.317246,0.739225 -1.360188,1.473678 -0.04295,0.742635 0.630847,0.839426 1.189781,0.656068 0.359559,-0.117922 1.126049,-0.589949 1.4655,-0.807048 0,0 0.544961,-0.36842 0.544961,-0.36842 0.124738,-0.03033 0.168022,0.08145 0.308436,0.185744 0.113151,0.08452 0.602559,0.324795 0.748428,0.387164 0.457032,0.195628 0.940987,0.256633 1.431419,0.290375 0.148935,0.01026 0.203466,0.03647 0.374895,0.02965 0,0 0.443058,-0.03408 0.443058,-0.03408 0,0 0.74979,-0.07327 0.74979,-0.07327 0.0702,-0.0034 0.231413,-0.04158 0.289351,0 0.07191,0.03476 0.02761,0.124055 0,0.177222 -0.07941,0.14587 -0.277763,0.328546 -0.307414,0.476799 -0.03783,0.189493 0.124055,0.314571 0.290714,0.351039 0.244704,0.05352 0.693897,-0.104294 0.920198,-0.206874 0.974046,-0.441014 1.678508,-0.969956 2.168599,-1.950478 0.10906,-0.217781 0.207556,-0.475435 0.248453,-0.71571 0.0098,-0.06033 0.04193,-0.193241 -0.01908,-0.234138 -0.06135,-0.04124 -0.162909,0.02045 -0.216756,0.05078 -0.177565,0.09951 -0.273674,0.201763 -0.47714,0.25152 z m -7.259335,-5.541974 c -0.461462,0.137348 -0.779101,0.576658 -1.363256,0.789666 -0.317638,0.115876 -0.52315,0.118603 -0.852035,0.11724 -0.325137,-0.0017 -0.627438,-0.129169 -0.954278,-0.09646 -0.469643,0.04703 -0.832609,0.334 -1.329175,0.297873 -0.371487,-0.02692 -1.1059395,-0.363989 -1.4314175,-0.557572 -0.239932,-0.142802 -0.558593,-0.403183 -0.852033,-0.388869 -0.233458,0.01158 -0.6189185,0.313549 -0.780806,0.475437 -1.1267296,1.126389 -0.834653,2.833525 0.371828,3.762925 0.787281,0.606649 1.514236,0.700373 2.3516145,1.084129 0.50645,0.231754 0.702077,0.419201 1.090605,0.807388 0.100204,0.100204 0.283557,0.33093 0.441693,0.284238 0.104633,-0.03067 0.291738,-0.293099 0.374557,-0.386483 0.245726,-0.277081 0.50304,-0.517013 0.819657,-0.713663 0.404204,-0.250499 0.949166,-0.400798 1.397336,-0.574953 0.858852,-0.333658 1.758941,-0.872484 2.1519,-1.744626 0.411703,-0.915087 0.260041,-1.933097 -0.448171,-2.658349 -0.265494,-0.271629 -0.58211,-0.551437 -0.988019,-0.49793 z M 2.3670212,13.2153 c 0.1455262,0.07226 0.051806,0.239591 0.01806,0.369782 0,0 -0.3145712,1.124687 -0.3145712,1.124687 -0.022838,0.08111 -0.088274,0.44374 -0.2273228,0.3691 -0.1114466,-0.05963 -0.150981,-0.518377 -0.1523439,-0.641752 -0.0044,-0.416815 0.190855,-1.150928 0.6761738,-1.221817 z m 19.4441108,-7.35e-4 c 0.147574,0.01364 0.224597,0.09509 0.327182,0.20074 0.292419,0.300598 0.342859,0.621986 0.342177,1.02176 -3.14e-4,0.171088 -0.01261,0.346608 -0.06611,0.51054 -0.02011,0.06237 -0.06953,0.177904 -0.156435,0.131212 -0.07054,-0.03749 -0.124739,-0.288328 -0.147573,-0.369102 0,0 -0.299235,-1.056523 -0.299235,-1.056523 -0.03306,-0.127123 -0.137348,-0.353762 0,-0.438627 z M 2.9518579,13.814738 c 0.2859423,-0.05963 0.3305887,0.191198 0.2910544,0.417839 0,0 -0.468278,1.261011 -0.468278,1.261011 -0.048736,0.122693 -0.1485948,0.440672 -0.3295666,0.380349 -0.1700672,-0.05692 -0.050445,-0.422609 -0.024885,-0.550755 0,0 0.2034653,-0.988361 0.2034653,-0.988361 0.059306,-0.236185 0.099181,-0.39773 0.3282046,-0.520083 z m 18.1047121,0.01026 c 0.22187,-0.06851 0.356493,0.07634 0.433175,0.271288 0,0 0.269584,1.22693 0.269584,1.22693 0.02999,0.120307 0.127804,0.471345 0,0.540871 -0.198013,0.10088 -0.315252,-0.286283 -0.362626,-0.404545 0,0 -0.433175,-1.124686 -0.433175,-1.124686 -0.05214,-0.193924 -0.06646,-0.366034 0.09303,-0.509858 z M 3.8362694,14.505569 c 0.2174384,0.03851 0.2099412,0.367056 0.2058514,0.544962 -0.00747,0.303324 -0.3646714,0.882025 -0.5251939,1.158767 -0.061005,0.104632 -0.1932412,0.380007 -0.3258185,0.383757 -0.220506,0.0058 -0.062365,-0.497248 -0.043968,-0.622327 0,0 0.090658,-0.511222 0.090658,-0.511222 0.074982,-0.399774 0.1540486,-0.803639 0.5984691,-0.953937 z m 16.4677846,0.0041 c 0.187789,0.01601 0.402842,0.207896 0.492477,0.370464 0.103605,0.18847 0.224937,0.976772 0.261744,1.22693 0.01398,0.09407 0.13803,0.568818 -0.109061,0.471346 -0.105309,-0.04157 -0.241296,-0.30128 -0.3023,-0.403184 -0.193242,-0.323432 -0.539851,-0.847263 -0.51497,-1.22693 0.0098,-0.152003 0.02556,-0.365352 0.17211,-0.438626 z',
'mickey-clin-d-oeil':'m 8.7190237,11.761315 c 0,0 0.9598725,-1.270833 0.9598725,-1.270833 C 10.379845,9.7117001 11.40644,8.9543621 12.372668,8.5393547 12.814681,8.3495253 13.284886,8.239518 13.76264,8.193847 13.85875,8.184707 14.187976,8.212507 14.210216,8.0866218 14.2281,7.984558 13.880595,7.7347598 13.802357,7.6640704 13.415547,7.3149865 13.061304,6.928176 12.793634,6.4794128 12.377832,5.7820427 12.124854,5.0330452 12.134388,4.21574 c 0.01268,-1.0794146 0.598879,-2.1560493 1.35026,-2.8990901 0.265686,-0.2625064 0.580611,-0.49363962 0.913411,-0.66480487 1.824444,-0.93723989 3.853803,-0.28673169 5.24219,1.10165417 0.408255,0.4082553 0.817305,0.9428 1.059955,1.4694019 0.325652,0.7053125 0.338757,1.1536786 0.33002,1.9062506 -0.01231,1.0377158 -0.620724,2.1389723 -1.389975,2.8081461 -0.268463,0.2335156 -0.563933,0.4424091 -0.873698,0.616354 -0.08459,0.047657 -0.270448,0.1366155 -0.230338,0.2609187 0.03336,0.1044496 0.364968,0.2426499 0.468619,0.2962636 0.365365,0.188639 0.735893,0.4618689 1.032553,0.7458196 0.65289,0.6242973 1.167976,1.3943423 1.600456,2.1826583 0.350274,0.637401 0.65448,1.323652 0.663217,2.065104 0.0016,0.154089 -0.0282,0.426126 0.06354,0.55043 0.116362,0.157663 0.299838,0.126289 0.571479,0.305397 0.370924,0.245034 0.551224,0.69737 0.556387,1.129851 0,0 0,0.397135 0,0.397135 -0.0013,0.645347 -0.26211,1.268452 -0.565125,1.826825 -0.679896,1.253757 -1.879641,2.463829 -3.088523,3.214415 -0.833984,0.517468 -1.363764,0.594116 -1.707683,0.791889 -0.340743,0.196185 -0.678308,0.645344 -0.992841,0.905072 -0.391177,0.323268 -1.158841,0.587363 -1.667965,0.560755 -0.456706,-0.02344 -0.961865,-0.170371 -1.31055,-0.475372 -0.192613,-0.168782 -0.577039,-0.65011 -0.754559,-0.718021 0,0 -0.833982,-0.08618 -0.833982,-0.08618 C 12.000556,22.410508 11.43781,22.231 10.94298,21.925603 10.508114,21.656744 9.9930343,21.238164 9.7622961,20.776295 9.5625344,20.376776 9.6344205,20.194094 9.4545145,19.902993 9.3480866,19.730636 9.178508,19.613879 9.043483,19.465747 8.8790681,19.28505 8.6765278,19.003481 8.5550024,18.790616 8.17574,18.127399 7.7670877,16.975708 7.7658952,16.209234 c 0,0 0,-0.595702 0,-0.595702 0,0 0.039712,-0.675131 0.039712,-0.675131 -0.2482088,0.09651 -0.5011816,0.325254 -0.7545539,0.464252 C 6.5220683,15.692959 5.8731498,15.924091 5.2639426,15.93124 4.3390117,15.941957 3.6078856,15.830761 2.8017013,15.333154 0.61507265,13.982894 -0.02471104,11.028204 0.95223858,8.7430862 1.2604195,8.0218869 1.8724053,7.18552 2.5237033,6.7474793 3.3970094,6.1601159 4.5292391,6.0699662 5.5022232,6.4420822 5.9148469,6.6001421 6.3536823,6.87774 6.6936326,7.1577207 7.2206263,7.5921863 7.5804324,8.0365814 7.9243538,8.623945 c 0.3613921,0.6171492 0.6151638,1.3542318 0.7037216,2.065105 0,0 0.090949,1.072265 0.090948,1.072265 z m 12.5494823,8.02214 c 0.265682,-0.179505 0.474179,-0.430097 0.678308,-0.675131 0.546853,-0.657656 0.970201,-1.385208 1.162414,-2.223959 0.107224,-0.467826 0.114773,-0.951537 -0.193801,-1.35026 -0.305398,-0.395151 -0.805391,-0.550431 -1.2895,-0.55599 -0.158457,-0.0016 -0.592924,0.08459 -0.670762,-0.05203 -0.05083,-0.08975 0.0095,-0.251784 0.03494,-0.345111 0.06752,-0.247813 0.07942,-0.340346 0.07982,-0.595703 0,0 0,-0.317708 0,-0.317708 -0.0016,-0.909441 -0.492447,-2.211251 -0.969805,-2.978518 -0.309368,-0.496817 -0.68347,-0.9594787 -1.254155,-1.1636063 -0.13423,-0.048053 -0.334785,-0.10246 -0.476561,-0.084988 -0.463855,0.056399 -0.822071,0.6894253 -0.965038,1.0897383 -0.09214,0.25814 -0.09492,0.381251 -0.142574,0.635021 -0.01152,0.06235 -0.0286,0.19142 -0.121918,0.174343 -0.08579,-0.01549 -0.204926,-0.220807 -0.25298,-0.293087 -0.21802,-0.32685 -0.345501,-0.524227 -0.599268,-0.833993 -0.616355,-0.7517761 -1.426511,-1.4280981 -2.445562,-1.4678122 -1.13263,-0.044082 -1.518248,0.7311275 -1.826823,1.6663812 -0.510716,1.547638 -0.465839,3.49241 0.270449,4.964194 0.229147,0.458295 0.516274,0.810951 0.852653,1.191407 0.0953,0.107223 0.436051,0.39793 0.469012,0.474975 0.09254,0.216042 -0.40746,0.200156 -0.51985,0.200156 0,0 -0.675131,0 -0.675131,0 -1.199745,0.0143 -2.5905105,0.777989 -2.6206935,2.104818 -0.025818,1.146133 0.8907715,1.988856 1.8661395,2.428087 0.401104,0.180697 0.685058,0.260521 1.111981,0.359012 0.09491,0.01311 0.326045,0.09332 0.39634,0 0.05361,-0.05957 0.0053,-0.308973 0,-0.404285 0.334386,0.15806 0.642961,0.701343 0.891963,0.992839 0.376883,0.441218 0.874099,0.681485 1.451931,0.675131 0.573859,-0.0067 1.310548,-0.375293 1.747392,-0.733114 0.254566,-0.208891 0.471403,-0.463853 0.754561,-0.638196 0.232322,-0.142968 0.5405,-0.222395 0.79427,-0.331211 0.47974,-0.206112 1.328418,-0.741452 1.628256,-1.156856 0,0 -1.350261,0.742247 -1.350261,0.742247 0,0 -1.23112,0.480931 -1.23112,0.480931 0,0 -0.595706,0.560359 -0.595706,0.560359 -0.429301,0.351862 -1.182667,0.744628 -1.747392,0.757734 -1.22993,0.0278 -1.682269,-1.228737 -2.038099,-2.183848 0,0 -0.392374,-0.913413 -0.392374,-0.913413 -0.04093,-0.100479 -0.100879,-0.292688 -0.234309,-0.292688 -0.102449,0 -0.18665,0.100879 -0.243838,0.174342 -0.150516,0.192213 -0.19817,0.357423 -0.427321,0.475768 0.02582,-0.28276 0.167593,-0.623502 0.36457,-0.830409 0.39793,-0.41739 1.374887,-0.701342 1.899101,-0.400711 0,0 -0.833981,0.176329 -0.833981,0.176329 -0.09332,0.03455 -0.229546,0.08975 -0.272835,0.186255 -0.04967,0.110012 0.03137,0.223191 0.08816,0.312547 0.157666,0.248209 0.252978,0.35067 0.462662,0.555592 0.656068,0.640978 1.816501,1.140972 2.740239,1.15209 0,0 0.516273,0 0.516273,0 1.135808,-0.0016 2.48885,-0.715241 3.33594,-1.43485 0.720405,-0.611987 1.185848,-1.301016 1.423731,-2.218797 0.06155,-0.238678 0.147734,-0.904278 -0.05401,-1.082591 -0.07942,-0.07029 -0.30063,-0.08062 -0.416595,-0.108812 0.08261,-0.06672 0.138601,-0.116361 0.238282,-0.159251 0.320886,-0.137409 0.799037,-0.106823 0.913412,0.278391 -0.310163,-0.03693 -0.316915,-0.01707 -0.317708,0.317708 -8.11e-4,0.438439 0.03217,0.812144 -0.137013,1.231122 -0.233515,0.578229 -0.728346,1.135807 -0.855826,1.4694 z m -1.429689,-3.534506 c 0,0 -0.714843,0.114771 -0.714843,0.114771 -0.632242,0.143763 -1.269643,0.43685 -1.747396,0.881642 -0.300632,0.279979 -0.25417,0.294675 -0.450748,0.589746 -0.03931,0.05917 -0.117161,0.163223 -0.201348,0.114772 -0.07585,-0.04329 -0.05798,-0.191419 -0.05957,-0.264492 -0.0047,-0.23709 -0.200948,-0.332005 -0.360599,-0.484903 -0.283159,-0.271243 -0.469416,-0.490462 -0.663621,-0.832395 -0.467425,-0.821277 -0.586566,-1.812528 -0.650503,-2.740237 0,0 -0.02901,-0.277994 -0.02901,-0.277994 0,-0.3189 0.07308,-0.903881 0.286334,-1.141765 0.271642,-0.31612 0.764488,-0.225971 1.056777,0 0.16243,0.134232 0.269656,0.28554 0.366157,0.466634 0.405481,0.763294 0.744631,2.192982 0.745823,3.057943 0,0 0,1.072267 0,1.072267 0.359408,-0.216438 0.42295,-0.285143 0.833985,-0.434864 0.211276,-0.07665 0.501582,-0.119139 0.67513,-0.234309 0.392371,-0.260521 0.586967,-0.599674 0.794272,-0.998796 0,0 0.07942,0 0.07942,0 0.217629,0.470209 -0.129467,0.658053 -0.397136,0.992838 0,0 0.436849,0.119142 0.436849,0.119142 z m -2.77677,0 c 0.07465,-0.274421 0.03734,-0.745423 0,-1.032553 -0.08301,-0.720802 -0.260521,-1.432468 -0.537327,-2.104818 -0.13304,-0.322475 -0.507143,-0.927312 -0.934458,-0.708093 -0.278392,0.142968 -0.32883,0.507936 -0.316918,0.787519 0,0 0.03815,0.476563 0.03815,0.476563 0.0028,0.576244 0.100079,0.918574 0.195391,1.469402 0.04804,0.277994 0.08895,0.650508 0.360599,0.794271 0,0 0.14416,-0.233913 0.14416,-0.233913 0.219218,-0.269258 0.515879,-0.150911 0.708492,0.07863 0.156867,0.187051 0.12986,0.288718 0.341936,0.472989 z m 1.188227,-0.992839 c 0,-0.48252 0.106823,-1.197364 0.480138,-1.54049 0.271243,-0.249003 0.900305,-0.256946 0.790696,0.229941 -0.0973,-0.02741 -0.269258,-0.104452 -0.357422,-0.09372 -0.166399,0.02027 -0.278789,0.201347 -0.356627,0.332004 -0.158458,0.264494 -0.405079,0.918974 -0.556785,1.072269 z m 0.119142,0.754558 c -0.141778,-0.50476 0.347891,-1.135808 0.79427,-1.329213 0.175534,-0.07585 0.696576,-0.116361 0.701342,0.172355 0.0036,0.202144 -0.315326,0.0282 -0.542487,0.110401 -0.453132,0.163618 -0.69459,0.818893 -0.953125,1.046451 z m 1.429688,0.851062 c 0.364173,-0.04487 0.832396,-0.01 1.103639,0.268462 0.370528,0.380456 0.194199,1.061147 -0.04964,1.461857 -0.448365,0.736686 -1.520632,1.459075 -2.404258,1.469402 0,0 -0.238282,0 -0.238282,0 -0.148926,-0.0019 -0.254563,-0.01028 -0.397136,-0.06155 -0.739461,-0.264094 -0.628662,-1.049629 -0.326049,-1.606412 0.452736,-0.831999 1.397125,-1.382033 2.311729,-1.531752 z m -4.090495,5.344253 c -0.330417,-0.03217 -0.516279,-0.397932 -0.70492,-0.633829 -0.152896,-0.191419 -0.632235,-0.475371 -0.881243,-0.491653 -0.126682,-0.0083 -0.152895,0.06354 -0.116361,0.173149 0,0 0.299839,0.674338 0.299839,0.674338 0.311752,0.822864 1.103244,1.087357 1.879246,0.72358 0.145351,-0.06831 0.650111,-0.312148 0.650111,-0.482917 0,-0.126288 -0.197377,-0.203333 -0.29269,-0.250194 -0.22279,-0.110013 -0.422552,-0.186655 -0.67513,-0.188244 -0.08697,-3.96e-4 -0.212469,-0.0051 -0.252579,0.09094 -0.04405,0.106433 0.04927,0.288322 0.09372,0.384824 z',
};
// Iconset API (Home Assistant 0.110 and up):
async function getIcon(name) {
return { path: ICONES_HACF[name] };
}
window.customIconsets = window.customIconsets || {};
window.customIconsets["hacf"] = getIcon;
if (!window.frontendVersion || window.frontendVersion < 20200519.0) {
// ha-iconset-svg (Up to Home Assistant 0.109):
const iconset = document.createElement("ha-iconset-svg");
iconset.name = "hacf";
iconset.size = "24";
let iconsetHTML = "";
for (let key in ICONES_HACF) {
iconsetHTML += `<g id="${key}"><path d="${ICONES_HACF[key]}" /></g>`;
}
iconset.innerHTML = `<svg><defs>${iconsetHTML}</defs></svg>`;
document.body.appendChild(iconset);
}
Personnellement, j’utilise beaucoup GIMP pour me créer un premier jet d’un chemin depuis une image en utilisant les fonctions de sélection automatique (avec +/- de seuil) et la transformation de la sélection en chemin pour ensuite travailler dans Inkscape.
Pour garder une certaine homogénéité, la taille du svg doit être de 24px mais le chemin dans celui ci ne dois pas excéder 22px de hauteur ou de largeur, comme les icônes mdi
Des questions ? N’hésitez pas.