{"id":3941,"date":"2023-05-15T20:48:05","date_gmt":"2023-05-15T18:48:05","guid":{"rendered":"https:\/\/www.sigalou-domotique.fr\/?p=3941"},"modified":"2026-01-02T17:02:00","modified_gmt":"2026-01-02T15:02:00","slug":"integrer-pronote-a-son-home-assistant","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant","title":{"rendered":"Integrate PRONOTE into your home Assistant"},"content":{"rendered":"<p><a href=\"https:\/\/www.index-education.com\/fr\/logiciel-gestion-vie-scolaire.php\" target=\"_blank\" rel=\"noopener\">Pronote<\/a> is a brilliant application of the company Index Education which equips a majority of schools.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3943 aligncenter\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote.png\" alt=\"\" width=\"353\" height=\"94\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote.png 353w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote-300x80.png 300w\" sizes=\"auto, (max-width: 353px) 100vw, 353px\" \/><\/p>\r\n<p>If you do not know, go your way, you do not need to integrate it into your home automation.<!--more--><\/p>\r\n<table style=\"width: 100%; border-collapse: collapse;\" border=\"4\">\r\n<tbody>\r\n<tr>\r\n<td><img loading=\"lazy\" decoding=\"async\" class=\"alignnone  wp-image-4542\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning.png\" alt=\"\" width=\"190\" height=\"190\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning.png 2400w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-300x300.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-100x100.png 100w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-600x600.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-1024x1024.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-150x150.png 150w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-768x768.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-1536x1536.png 1536w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/warning-2048x2048.png 2048w\" sizes=\"auto, (max-width: 190px) 100vw, 190px\" \/>\r\n<p><em>\u00a0<\/em><\/p>\r\n<\/td>\r\n<td style=\"width: 80%;\">\r\n<p><em>Be careful, this Retex is outdated, indeed since June 2023, a <a href=\"https:\/\/github.com\/delphiki\/hass-pronote\" target=\"_blank\" rel=\"noopener\">integration<\/a> (thank you comes <a href=\"https:\/\/forum.hacf.fr\/u\/delphiki\" target=\"_blank\" rel=\"noopener\">Delphiki<\/a>) take care of everything described below. Some links or files in my HA may no longer match the rest of this text. Of course, I would recommend using integration.<\/em><\/p>\r\n<p><em>Here is the latest Retex:\u00a0<a href=\"https:\/\/www.sigalou-domotique.fr\/en\/travail-sur-les-cartes-ha-de-pronote\/\" target=\"_blank\" rel=\"noopener\">I'm working on Pronote's HA cards.<\/a><\/em><\/p>\r\n<\/td>\r\n<\/tr>\r\n<\/tbody>\r\n<\/table>\r\n<p>&nbsp;<\/p>\r\n<p>This integration is based on the Dathosim script (Thank you very much!!)<br \/><a href=\"https:\/\/github.com\/dathosim\/Pronote2Homeassistant\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/dathosim\/Pronote2Homeassistant<\/a><\/p>\r\n<p>I modified a few lines of the code, either to adapt to my use or to adapt to the new HA standards (platform: template\/sensors: become template:\/sensor for example)<\/p>\r\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_89 counter-hierarchy ez-toc-counter ez-toc-light-blue ez-toc-container-direction\">\n<label for=\"ez-toc-cssicon-toggle-item-6ae4d81d2550b\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewbox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewbox=\"0 0 24 24\" version=\"1.2\" baseprofile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6ae4d81d2550b\"  aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1' ><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Installation_de_la_librairie_PronotePy\" >Installation of the PronotePy library<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Installation_du_script_python_de_Dathosim\" >Installation of the Dathosim python script<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Configurer_le_script_Python\" >Configure Python script<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Configuration_specifique_Sigalou\" >Specific configuration Sigalou<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Lancer_le_script\" >Launch the script<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Automatiser_le_lancement_du_script\" >Automate script launch<\/a><ul class='ez-toc-list-level-4' ><li class='ez-toc-heading-level-4'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Ajout_dune_automatisation_qui_lance_une_commande_shell\" >Adding an automation that launches a shell command<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Recuperer_les_donnees\" >Recover data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-9\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Creer_lecran_Pronote\" >Create Pronote screen<\/a><\/li><\/ul><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-10\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Bonus\" >Bonus<\/a><ul class='ez-toc-list-level-3' ><li class='ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-11\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Ajout_dune_carte_de_mise_a_jour\" >Adding an update map<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-12\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Limiter_la_mise_a_jour_aux_jours_ouvrables\" >Limit the update to working days<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-13\" href=\"https:\/\/www.sigalou-domotique.fr\/en\/integrer-pronote-a-son-home-assistant\/#Lier_Pronote_et_le_declenchement_du_reveil_Alexa\" >Linking Pronote and triggering the Alexa alarm clock<\/a><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Installation_de_la_librairie_PronotePy\"><\/span>Installation of the PronotePy library<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>It is a python library developed in open source: <a href=\"https:\/\/github.com\/bain3\/pronotepy\">pronotepy<\/a><\/p>\r\n<p>To install this library, run on the command line:<\/p>\r\n<blockquote>\r\n<p>pip install pronotepy<\/p>\r\n<\/blockquote>\r\n<p>or to have the latest version (not recommended):<\/p>\r\n<blockquote>\r\n<p>pip install https:\/\/github.com\/bain3\/pronotepy\/archive\/refs\/heads\/master.zip<\/p>\r\n<\/blockquote>\r\n<p>From time to time, you have to think about throwing a little shot of:<\/p>\r\n<blockquote>\r\n<p>pip install \u2013upgrade pronotepy<\/p>\r\n<\/blockquote>\r\n<h3 dir=\"auto\" tabindex=\"-1\"><span class=\"ez-toc-section\" id=\"Installation_du_script_python_de_Dathosim\"><\/span>Installation of the Dathosim python script<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>Go to the \/config folder of your HA and create a new folder that can be called <strong>python _scripts<\/strong> and that will contain your custom scripts.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3944\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote1-1.png\" alt=\"\" width=\"397\" height=\"231\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote1-1.png 397w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote1-1-300x175.png 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/p>\r\n<p>In this \/config\/python_scripts folder, place the files\u00a0<a href=\"https:\/\/github.com\/dathosim\/Pronote2Homeassistant\/blob\/main\/pronote.py\" target=\"_blank\" rel=\"noopener\">pronote.py<\/a> and <a href=\"https:\/\/github.com\/dathosim\/Pronote2Homeassistant\/blob\/main\/config.ini\" target=\"_blank\" rel=\"noopener\">config.ini<\/a> of distribution <a href=\"https:\/\/github.com\/dathosim\/Pronote2Homeassistant\" target=\"_blank\" rel=\"noopener\">Pronote2Homeassistant<\/a>.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3945\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote3.png\" alt=\"\" width=\"369\" height=\"226\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote3.png 369w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote3-300x184.png 300w\" sizes=\"auto, (max-width: 369px) 100vw, 369px\" \/><\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"Configurer_le_script_Python\"><\/span>Configure Python script<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>It is necessary to edit the file <strong>config.ini<\/strong> and add specific information.<\/p>\r\n<h4><span class=\"ez-toc-section\" id=\"Configuration_specifique_Sigalou\"><\/span>Specific configuration Sigalou<span class=\"ez-toc-section-end\"><\/span><\/h4>\r\n<p>I had problems identifying with the ENT atrium _sud. For some reason, I had to change the Python script. I will pass this information on to Dathosim to see what happens. I give here my modifications, they may be useful. I have amended line 57.<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\"># client = (pronotepy.ParentClient if type _account == 'parent' else pronotepy.Client)(url, username, password, ent) client = (pronotepy.ParentClient if type _account == 'parent' else pronotepy.Client)('https:\/\/0xx0xxxx.index-education.net\/pronote\/mobile.parent.html', username = 'xxxxx', password='yyyyy', ent=atrium _sud)<\/pre>\r\n<ul>\r\n<li>To get the URL, I went on pronote to look at the proposed URL when flashing the QR code.<\/li>\r\n<li>For xxxx you have to enter the username and yyyy the password.<\/li>\r\n<\/ul>\r\n<p>With this, the script works perfectly. If you are a little more fortunate than me, everything should work well with the script provided by completing the configuration file with your credentials.<\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"Lancer_le_script\"><\/span>Launch the script<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>This is where you have to cross your fingers to make sure everything is going well.<\/p>\r\n<p>You must connect to the SSH command line, go to the phyton_scripts folder previously created with one of the following:<\/p>\r\n<blockquote>\r\n<p>cd \/config\/python_scripts<\/p>\r\n<\/blockquote>\r\n<p>cd \/usr\/share\/hassio\/homeassistant\/python_scripts\/ (in Dathosim)<\/p>\r\n<p>then run the script with:<\/p>\r\n<blockquote>\r\n<p>python3 pronote.py<\/p>\r\n<\/blockquote>\r\n<p>If nothing special happens, no error message is that it is OK, the script went well.<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3948\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote4.png\" alt=\"\" width=\"318\" height=\"52\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote4.png 318w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote4-300x49.png 300w\" sizes=\"auto, (max-width: 318px) 100vw, 318px\" \/><\/p>\r\n<p>When everything went well, a file <strong>pronote_prenomenfant.json<\/strong> is created in \/config\/www<\/p>\r\n<p>It is this file that will be queried by HA to retrieve the information.<\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"Automatiser_le_lancement_du_script\"><\/span>Automate script launch<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>There is the classic method, probably preferred by Linux purists, i.e. adding a crontab\u00a0<\/p>\r\n<blockquote>\r\n<p>*\/10 * * * \/usr\/bin\/python3 \/usr\/share\/hassio\/homeassistant\/python_scripts\/pronote.py &gt; \/tmp\/pronote.log 2&gt;&amp;1<\/p>\r\n<\/blockquote>\r\n<p>or depending on your system:<\/p>\r\n<blockquote>\r\n<p>*\/10 * * * * \/config\/python_scripts\/pronote.py &gt; \/tmp\/pronote.log 2&gt;&amp;1<\/p>\r\n<\/blockquote>\r\n<p>This is not the method I have chosen, I would like to use 100% Home Assistant and in my learning phase, I looked at how to launch a cron and how to launch a Python script.<\/p>\r\n<h4><span class=\"ez-toc-section\" id=\"Ajout_dune_automatisation_qui_lance_une_commande_shell\"><\/span>Adding an automation that launches a shell command<span class=\"ez-toc-section-end\"><\/span><\/h4>\r\n<p>HA calls this a timer pattern<\/p>\r\n<p>I add a _command.yaml shell file to my configuration.yaml file\u00a0<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3960\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote7.png\" alt=\"\" width=\"323\" height=\"48\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote7.png 323w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote7-300x45.png 300w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/p>\r\n<p>In this _command.yaml shell file, I add:<\/p>\r\n<blockquote>\r\n<p>update_pronote: python3 \/config\/python_scripts\/pronote.py<\/p>\r\n<\/blockquote>\r\n<p>In Automatisations, I add a new automation that will launch the script update_pronote\u00a0<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3962\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote8.png\" alt=\"\" width=\"851\" height=\"223\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote8.png 851w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote8-600x157.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote8-300x79.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote8-768x201.png 768w\" sizes=\"auto, (max-width: 851px) 100vw, 851px\" \/><\/p>\r\n<p>Trigger is a trigger every 10 minutes<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3963\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote9.png\" alt=\"\" width=\"500\" height=\"431\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote9.png 500w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote9-300x259.png 300w\" sizes=\"auto, (max-width: 500px) 100vw, 500px\" \/><\/p>\r\n<p>and the action is a shell command that launches update_pronote<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3964\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote10.png\" alt=\"\" width=\"380\" height=\"264\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote10.png 380w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote10-300x208.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><\/p>\r\n<p>In YAML mode, this gives:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3965\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote11.png\" alt=\"\" width=\"387\" height=\"277\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote11.png 387w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote11-300x215.png 300w\" sizes=\"auto, (max-width: 387px) 100vw, 387px\" \/><\/p>\r\n<p>Every 10 minutes, I have the file \/config\/www\/pronote_enfant.json generated.<\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"Recuperer_les_donnees\"><\/span>Recover data<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>It is then HA who will launch REST queries to fetch the data<\/p>\r\n<p>Dathosim gives all the requests to launch, they are on:<br \/><a href=\"https:\/\/github.com\/dathosim\/Pronote2Homeassistant\/blob\/main\/configuration.yaml\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/dathosim\/Pronote2Homeassistant\/blob\/main\/configuration.yaml<\/a><\/p>\r\n<p>It is of course necessary to replace:<\/p>\r\n<ul>\r\n<li><strong>demo<\/strong> by the child\u2019s first name<\/li>\r\n<li><strong>192.168.XX.XX<\/strong> by the IP address of HA<\/li>\r\n<\/ul>\r\n<p>I have modified some syntaxes or sensors (the templates), see my file <a href=\"https:\/\/github.com\/sigalou\/home-assistant-config-fr\/blob\/main\/templates.yaml\" target=\"_blank\" rel=\"noopener\">templates.yaml<\/a><\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"Creer_lecran_Pronote\"><\/span>Create Pronote screen<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>The last step is to display the sensors that start with pronote \u2026 on maps to make a beautiful screen.<\/p>\r\n<p>Here is the code of the Dathosim screen: <a href=\"https:\/\/github.com\/dathosim\/Pronote2Homeassistant\/blob\/main\/lovelace.yaml\" target=\"_blank\" rel=\"noopener\">https:\/\/github.com\/dathosim\/Pronote2Homeassistant\/blob\/main\/lovelace.yaml<\/a><\/p>\r\n<p>Here is my code:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">Type: horizontal-stack columns: 2 square: false cards: - type: vertical-stack cards: - type: markdown content: | -\r\n          &lt;div&gt;Today&#039;s schedule &lt;\/div&gt;\r\n          &lt;table&gt;\r\n              &lt;tbody&gt;\r\n                  {%-for attr in states.sensor.pronote_edt_coralie_today.attributes.edt_today -%}\r\n                  &lt;tr style=&quot;background-color:#FF0000&quot;&gt;&lt;td&gt;\r\n                      {%- if state_attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;cancellation&#039;] == false -%}\r\n                          &lt;mark&gt;\r\n                          {{state _attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;hour&#039;]}}\r\n                          &lt;\/mark&gt;\r\n                      {%- else -%}\r\n                          &lt;span&gt;\r\n                          {{state _attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;hour&#039;]}}\r\n                          &lt;\/span&gt;\r\n                      {% endif %}&lt;\/td&gt;\r\n                      &lt;td&gt;{{state _attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;_fin time&#039;]}}&lt;\/td&gt;\r\n                      &lt;td&gt;\r\n                      {{state _attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;course&#039;]}} {% if not state_attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;status&#039;] == None %}&lt;span&gt;{{state _attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;status&#039;]}}&lt;\/span&gt;\r\n                      {% endif %}&lt;\/td&gt;\r\n                      &lt;td&gt;{{state _attr(&#039;sensor.pronote_edt_coralie_today&#039;, &#039;edt_today&#039;)[loop.index-1][&#039;room&#039;]}}&lt;\/td&gt;\r\n                  &lt;\/tr&gt;\r\n                  {% endfor %}\r\n            &lt;\/tbody&gt;\r\n          &lt;\/table&gt;\r\n        card_mod: style: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | div { background-color:rgb(100, 100, 100); padding: 12px 12px; color:white; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; border-top-right-radius: 5px; } table{ border-collapse: collapse; font-size: 0.9em; font-family: Roboto; width: 100%; outline: 0px solid #393c3d; margin-top:5px; } caption { text-align: center; font-weight: bold; font-size: 1.2em; } td { padding: 5px 10px 5px 10px; text-align: left; border-bottom: 0px solid #1c2020; } tr { border-bottom: 0px solid #1c2020; } tr:nth-of-type(even) { background-color: rgb(54, 54, 54, 0.3); } tr:last-of-type { border-bottom: transparent; }* mark { background: #009767; color: #222627; border-radius: 5px; padding: 5px; } span { background: #EC4B34; color: #222627; border-radius: 5px; padding: 5px; } span { padding: 5px; } tr:nth-child(n+2) &amp;gt; td:nth-child(2) { text-align: left; } - type: markdown content: &amp;gt;-\r\n          &lt;div&gt;Time use of: {{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[0][&#039;date&#039;]}}&lt;\/div&gt;\r\n\r\n          &lt;table&gt;\r\n              &lt;tbody&gt;\r\n                  {%-for attr in states.sensor.pronote_edt_coralie_nextday.attributes.edt_nextday -%}\r\n                  &lt;tr style=&quot;background-color:#FF0000&quot;&gt;&lt;td&gt;\r\n                      {%- if state_attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;cancellation&#039;] == false -%}\r\n                          &lt;mark&gt;\r\n                          {{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;hour&#039;]}}\r\n                          &lt;\/mark&gt;\r\n                      {%- else -%}\r\n                          &lt;span&gt;\r\n                          {{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;hour&#039;]}}\r\n                          &lt;\/span&gt;\r\n                      {% endif %}&lt;\/td&gt;\r\n                      &lt;td&gt;{{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;_fin time&#039;]}}&lt;\/td&gt;\r\n                      &lt;td&gt;\r\n                      {{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;course&#039;]}} {% if not state_attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;status&#039;] == None %}&lt;span&gt;{{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;status&#039;]}}&lt;\/span&gt;\r\n                      {% endif %}&lt;\/td&gt;\r\n                      &lt;td&gt;{{state _attr(&#039;sensor.pronote_edt_coralie_nextday&#039;, &#039;edt_nextday&#039;)[loop.index-1][&#039;room&#039;]}}&lt;\/td&gt;\r\n                  &lt;\/tr&gt;\r\n                  {% endfor %}\r\n            &lt;\/tbody&gt;\r\n          &lt;\/table&gt;\r\n        card_mod: style: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | div { background-color:rgb(100, 100, 100); padding: 12px 12px; color:white; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; border-top-right-radius: 5px; } table{ border-collapse: collapse; font-size: 0.9em; font-family: Roboto; width: 100%; outline: 0px solid #393c3d; margin-top:5px; } caption { text-align: center; font-weight: bold; font-size: 1.2em; } td { padding: 5px 10px 5px 10px; text-align: left; border-bottom: 0px solid #1c2020; } tr { border-bottom: 0px solid #1c2020; } tr:nth-of-type(even) { background-color: rgb(54, 54, 54, 0.3); } tr:last-of-type { border-bottom: transparent; }* mark { background: #009767; color: #222627; border-radius: 5px; padding: 5px; } span { background: #EC4B34; color: #222627; border-radius: 5px; padding: 5px; } span { padding: 5px; } tr:nth-child(n+2) &amp;gt; td:nth-child(2) { text-align: left; } - type: markdown content: | -\r\n      &lt;div&gt;Duties&lt;\/div&gt;\r\n      &lt;table&gt;\r\n          &lt;tbody&gt;\r\n              {%-for attr in states.sensor.pronote_devoir_coralie.attributes.devoir -%}\r\n              &lt;tr&gt;\r\n                  &lt;td&gt;\r\n                  {%- if state_attr(&#039;sensor.pronote_devoir_coralie&#039;, &#039;duty&#039;)[loop.index-1][&#039;done&#039;] == true -%}\r\n                      &lt;mark&gt;\r\n                      {{state _attr(&#039;sensor.pronote_devoir _coralie&#039;, &#039;duty&#039;)[loop.index-1][&#039;date&#039;]}}\r\n                      &lt;\/mark&gt;\r\n                  {%- else -%}\r\n                      &lt;span&gt;\r\n                      {{state _attr(&#039;sensor.pronote_devoir _coralie&#039;, &#039;duty&#039;)[loop.index-1][&#039;date&#039;]}}\r\n                      &lt;\/span&gt;\r\n                  {% endif %}&lt;\/td&gt;              \r\n                  &lt;td&gt;{{state _attr(&#039;sensor.pronote_devoir _coralie&#039;, &#039;duty&#039;)[loop.index-1][&#039;title&#039;]}}&lt;\/td&gt;\r\n                  &lt;td&gt;{{state _attr(&#039;sensor.pronote_devoir _coralie&#039;, &#039;duty&#039;)[loop.index-1][&#039;description&#039;]}}&lt;\/td&gt;\r\n              &lt;\/tr&gt;\r\n              {% endfor %}\r\n        &lt;\/tbody&gt;\r\n      &lt;\/table&gt;\r\n    card_mod: style: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | h1 { font-weight: normal; font-size: 24px; } div { background-color:rgb(100, 100, 100); padding: 12px 12px; color:white; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; border-top-right-radius: 5px; } table{ border-collapse: collapse; font-size: 0.9em; font-family: Roboto; width: auto; outline: 0px solid #393c3d; margin-top: 10px; } caption { text-align: center; font-weight: bold; font-size: 1.2em; } td { padding: 5px 5px 5px 5px; text-align: left; border-bottom: 0px solid #1c2020; } tr { border-bottom: 0px solid #1c2020; } tr:nth-of-type(even) { background-color: rgb(54, 54, 54, 0.3); } tr:last-of-type { border-bottom: transparent; } mark { background: #009767; color: #222627; border-radius: 5px; padding: 5px; } span { background: #EC4B34; color: #222627; border-radius: 5px; padding: 5px; } span { padding: 5px; } tr:nth-child(n+2) &amp;gt; td:nth-child(2) { text-align: left; } - type: markdown content: | -\r\n      &lt;div&gt;Evaluations&lt;\/div&gt;\r\n      &lt;table width=&#039;100%&#039;&gt;\r\n        &lt;tbody&gt;\r\n        {%-for attr in states.sensor.pronote_eval_coralie.attributes.evaluation -%} {% if loop.index &lt; 40  %}\r\n        &lt;tr&gt;\r\n        &lt;td width=&#039;10%&#039;&gt;{{attr[&#039;date _courte&#039;]}}&lt;\/td&gt;\r\n        &lt;td width=&#039;70%&#039;&gt;{{attr[&#039;eval&#039;]}}&lt;\/td&gt;\r\n        &lt;td width=&#039;20%&#039;&gt;\r\n        {%for attr2 in attr.acquisitions-%}{% if attr2[&#039;acquisition _level&#039;] == &quot;A+&quot; %} \ud83d\udc9a {% elif attr2[&#039;acquisition _level&#039;] == &quot;A&quot; %} \ud83d\udfe2 {% elif attr2[&#039;acquisition _level&#039;] == &quot;B+&quot; %} \u26aa + {% elif attr2[&#039;acquisition _level&#039;] == &quot;B&quot; %} \u26aa {% elif attr2[&#039;acquisition _level&#039;] == &quot;C+&quot; %} \ud83d\udfe1+ {% elif attr2[&#039;acquisition _level&#039;] == &quot;C&quot; %} \ud83d\udfe1 {% elif attr2[&#039;acquisition _level&#039;] == &quot;D+&quot; %} \u26aa + {% elif attr2[&#039;acquisition _level&#039;] == &quot;D&quot; %} \u26aa {% elif attr2[&#039;acquisition _level&#039;] == &quot;E&quot; %} \ud83d\udd34 {% else %}{{ attr2[&#039;acquisition _level&#039;]}} {% endif %} {% endfor %}\r\n        &lt;\/td&gt;\r\n        &lt;\/tr&gt;\r\n        {% endif %} {% endfor %}\r\n      &lt;\/tbody&gt;\r\n      &lt;\/table&gt;\r\n    card_mod: style: .: | ha-card ha-markdown { padding:0px } ha-card ha-markdown.no-header { padding:0px } ha-markdown$: | h1 { font-weight: normal; font-size: 24px; } div { background-color:rgb(100, 100, 100); padding: 12px 12px; color:white; font-weight:normal; font-size:1.2em; border-top-left-radius: 5px; border-top-right-radius: 5px; } table{ border-collapse: collapse; font-size: 0.9em; font-family: Roboto; width: auto; outline: 0px solid #393c3d; margin-top: 10px; } caption { text-align: center; font-weight: bold; font-size: 1.2em; } td { padding: 5px 5px 5px 5px; text-align: left; border-bottom: 0px solid #1c2020; } tr { border-bottom: 0px solid #1c2020; } tr:nth-of-type(even) { background-color: rgb(54, 54, 54, 0.3); } tr:last-of-type { border-bottom: transparent; } mark { background: #009767; color: #222627; border-radius: 10px; padding: 5px; } span { background: #EC4B34; color: #222627; border-radius: 10px; padding: 5px; } span { padding: 5px; } tr:nth-child(n+2) &amp;gt; td:nth-child(2) { text-align: left; }\r\n<\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3969\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12.png\" alt=\"\" width=\"1615\" height=\"862\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12.png 1615w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12-600x320.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12-300x160.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12-1024x547.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12-768x410.png 768w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote12-1536x820.png 1536w\" sizes=\"auto, (max-width: 1615px) 100vw, 1615px\" \/><\/p>\r\n<p>Please note:<\/p>\r\n<p>I changed the colour of the dots because the correspondence was not good with the configuration of the pronote of my daughter\u2019s establishment. For green plus, I put a green heart.<\/p>\r\n<h2 dir=\"auto\" tabindex=\"-1\"><span class=\"ez-toc-section\" id=\"Bonus\"><\/span>Bonus<span class=\"ez-toc-section-end\"><\/span><\/h2>\r\n<h3 dir=\"auto\" tabindex=\"-1\"><span class=\"ez-toc-section\" id=\"Ajout_dune_carte_de_mise_a_jour\"><\/span>Adding an update map<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3977\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote13.png\" alt=\"\" width=\"462\" height=\"195\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote13.png 462w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote13-300x127.png 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/p>\r\n<p>In order to reduce the update from every 10 minutes to every 4 hours, I have added the map in the image above.<\/p>\r\n<p>Thus, we have the delay since the last update and if we want an immediate update, we press it and start EXECUTION<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3979\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote14.png\" alt=\"\" width=\"570\" height=\"276\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote14.png 570w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote14-300x145.png 300w\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" \/><\/p>\r\n<p>Card code:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">- type: custom:auto-entities card: Type: entities filter: include: - entity_id: automation.mise _a _jour _pronote options: secondary_info: last-triggered<\/pre>\r\n<h3><span class=\"ez-toc-section\" id=\"Limiter_la_mise_a_jour_aux_jours_ouvrables\"><\/span>Limit the update to working days<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>After switching the update tempo from 10 minutes to 4 hours, I tried to limit this update to working days.<\/p>\r\n<p>There is an integration that creates a binary _sensor that gives us this information: <a href=\"https:\/\/www.home-assistant.io\/integrations\/workday\/\" target=\"_blank\" rel=\"noopener\">Workday<\/a>.<\/p>\r\n<p>I do not enter its installation, the doc is archi-simple.<\/p>\r\n<p>I just added a condition in automation:<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3985\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote15.png\" alt=\"\" width=\"1068\" height=\"351\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote15.png 1068w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote15-600x197.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote15-300x99.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote15-1024x337.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote15-768x252.png 768w\" sizes=\"auto, (max-width: 1068px) 100vw, 1068px\" \/><\/p>\r\n<p>Here is the full automation code:<\/p>\r\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">alias: Updated Pronote Description: \"\" trigger: - platform: time_pattern hours: \/4 condition: - type: is_on condition: device device _id: 64bbc75616d4864596e1fd861c865904 entity_id: binary_sensor.workday domain: binary_sensor action: - service: shell_command.update_pronote data: {} mode: single<\/pre>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3987\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote16.png\" alt=\"\" width=\"524\" height=\"130\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote16.png 524w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote16-300x74.png 300w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/p>\r\n<p><em>Edit<\/em> : one <a href=\"https:\/\/www.sigalou-domotique.fr\/en\/ecole-demain\/\" target=\"_blank\" rel=\"noopener\">new tutorial<\/a> allows you to trigger the Pronote update only on working days and off school holidays.<\/p>\r\n<h3><span class=\"ez-toc-section\" id=\"Lier_Pronote_et_le_declenchement_du_reveil_Alexa\"><\/span>Linking Pronote and triggering the Alexa alarm clock<span class=\"ez-toc-section-end\"><\/span><\/h3>\r\n<p>This will be the next step<\/p>\r\n<p>But I'll schedule this on a Sunday to have a class start time tomorrow<\/p>\r\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-3990\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote17.png\" alt=\"\" width=\"497\" height=\"225\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote17.png 497w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2023\/05\/pronote17-300x136.png 300w\" sizes=\"auto, (max-width: 497px) 100vw, 497px\" \/><\/p>","protected":false},"excerpt":{"rendered":"<p>Pronote is a great app from Index Education that equips a majority of schools. If you do not know, go your way, it is because you do not need to integrate it into your home automation.<\/p>","protected":false},"author":1,"featured_media":3942,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,53,166],"tags":[84],"class_list":["post-3941","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-domotique","category-home-assistant","category-retex","tag-pronote"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/3941","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=3941"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/posts\/3941\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media\/3942"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/media?parent=3941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/categories?post=3941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/en\/wp-json\/wp\/v2\/tags?post=3941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}