<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>原名： Sigalou Domotique</title>
	<atom:link href="https://www.sigalou-domotique.fr/zh/tag/pronote/feed" rel="self" type="application/rss+xml" />
	<link href="">https://www.sigalou-domotique.fr/zh</link>
	<description>网络安全，家庭助理，365...</description>
	<lastbuilddate>弗里，2026年1月2日 15:02:00 + 0000</lastbuilddate>
	<language>ZH - 汉斯</language>
	<sy:updateperiod>
	小时 小时	</sy:updateperiod>
	<sy:updatefrequency>
	1	</sy:updatefrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>

<image>
	<url>https://www.sigalou-domotique.fr/wp-content/uploads/2026/04/cropped-sigalou-carre-32x32.png</url>
	<title>原名： Sigalou Domotique</title>
	<link href="">https://www.sigalou-domotique.fr/zh</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>我激活Pronote，回到学校2023年9月</title>
		<link href="">https://www.sigalou-domotique.fr/zh/jactive-pronote-rentree-septembre-2023</link>
		
		<dc:creator><![CDATA[Sigalou]]></dc:creator>
		<pubdate>图伊，2023年9月5日 16:51:34 + 0000</pubdate>
				<category><![CDATA[Domotique]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[Retex]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Pronote]]></category>
		<guid ispermalink="false">https://www.sigalou-domotique.fr/?p=4956</guid>

					<description><![CDATA[J&#8217;avais supprimé en juillet dernier l&#8217;intégration Pronote, je repars donc tout neuf pour réactiver tout cela pour la rentrée de septembre. Attention, pour cette rentrée, il est nécessaire d&#8217;installer la dernière modification de delphiki (passage en pronotepy 2.12.1), sinon l&#8217;authentification ne fonctionne plus. J&#8217;ajoute le dépôt Pronote J&#8217;installe l&#8217;intégration Avant toute chose, j&#8217;installe l&#8217;intégration: Je [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>J&rsquo;avais supprimé en juillet dernier l&rsquo;intégration Pronote, je repars donc tout neuf pour réactiver tout cela pour la rentrée de septembre.</p>
<p>Attention, pour cette rentrée, il est nécessaire d&rsquo;installer la dernière modification de <a href="https://forum.hacf.fr/u/delphiki" target="_blank" rel="noopener">delphiki</a> (passage en pronotepy 2.12.1), <strong>sinon l&rsquo;authentification ne fonctionne plus</strong>. <span id="more-4956"></span></p>
<h3>J&rsquo;ajoute le dépôt Pronote</h3>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote3.png"><img fetchpriority="high" decoding="async" class="alignnone size-full wp-image-4966" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote3.png" alt="" width="542" height="250" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote3.png 542w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote3-300x138.png 300w" sizes="(max-width: 542px) 100vw, 542px" /></a></p>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote4.png"><img decoding="async" class="alignnone size-full wp-image-4967" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote4.png" alt="" width="180" height="64" /></a></p>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote5.png"><img decoding="async" class="alignnone size-full wp-image-4969" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote5.png" alt="" width="616" height="109" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote5.png 616w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote5-600x106.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote5-300x53.png 300w" sizes="(max-width: 616px) 100vw, 616px" /></a></p>
<h3>J&rsquo;installe l&rsquo;intégration</h3>
<p>Avant toute chose, j&rsquo;installe l&rsquo;intégration:</p>
<p><a href="https://my.home-assistant.io/redirect/brand/?brand=pronote" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4962" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/add_integration.png" alt="" width="207" height="30" /></a></p>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote1.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4964" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote1.png" alt="" width="609" height="220" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote1.png 609w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote1-600x217.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote1-300x108.png 300w" sizes="auto, (max-width: 609px) 100vw, 609px" /></a></p>
<h3>Je m&rsquo;identifie</h3>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4965" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2.png" alt="" width="410" height="582" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2.png 410w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2-211x300.png 211w" sizes="auto, (max-width: 410px) 100vw, 410px" /></a></p>
<p>Ma fille est sur Atrium (Académie Aix-Marseille), c&rsquo;est les identifiants Atrium qu&rsquo;il faut donc utiliser.</p>
<p>J&rsquo;utilise le compte Parent avec le lien https://xxxxxxxg.index-education.net/pronote/ sans oublier de sélectionner Atrium dans l&rsquo;ENT.</p>
<h3>Ma page Home Assistant réalisée l&rsquo;année scolaire dernière refonctionne</h3>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4973" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023.png" alt="" width="1291" height="763" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023.png 1291w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023-600x355.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023-300x177.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023-1024x605.png 1024w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/09/pronote2023-768x454.png 768w" sizes="auto, (max-width: 1291px) 100vw, 1291px" /></a></p>
<p>Pour les détails de sa réalisation, il faut se référer à ce Retex :</p>
<ul>
<li><a href="https://www.sigalou-domotique.fr/travail-sur-les-cartes-ha-de-pronote" target="_blank" rel="noopener">Je travaille sur les cartes HA de Pronote</a></li>
</ul>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>我正在研究Pronote的HA卡。</title>
		<link href="">https://www.sigalou-domotique.fr/zh/travail-sur-les-cartes-ha-de-pronote</link>
		
		<dc:creator><![CDATA[Sigalou]]></dc:creator>
		<pubdate>太阳，2023年6月18日 17:29:04 + 0000</pubdate>
				<category><![CDATA[Domotique]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[Retex]]></category>
		<category><![CDATA[Pronote]]></category>
		<guid ispermalink="false">https://www.sigalou-domotique.fr/?p=4480</guid>

					<description><![CDATA[Ce bloc est le suivi de mon travail sur les cartes proposées par @vingerha et celles de @dathosim. Mon objectif est de remplacer le script python par l&#8217;intégration. [Mise à jour de cette page] Suite à la correction de V0.6.0, homeworks remplacé par homework  Ajout de la carte Menu de la Cantine (&#62;V6.0.6) Prérequis Je [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Ce bloc est le suivi de mon travail sur les cartes proposées par @vingerha et celles de @dathosim.</p>
<p>Mon objectif est de remplacer le script <a href="https://github.com/dathosim/Pronote2Homeassistant" target="_blank" rel="noopener">python</a> par <a href="https://github.com/delphiki/hass-pronote" target="_blank" rel="noopener">l&rsquo;intégration</a>.<span id="more-4480"></span></p>
<h3>[Mise à jour de cette page]</h3>
<ul>
<li>Suite à la correction de V0.6.0, <code>homeworks</code> remplacé par <code>homework</code> </li>
<li>Ajout de la carte Menu de la Cantine (&gt;V6.0.6)</li>
</ul>
<h3>Prérequis</h3>
<p>Je pense à installer l&rsquo;interface <a href="https://github.com/thomasloven/lovelace-card-mod" target="_blank" rel="noopener">card-mod</a> dans HACS</p>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/8ce2defc80963bf54ef910b4261023c546729b5c_2_690x338.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5014" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/8ce2defc80963bf54ef910b4261023c546729b5c_2_690x338.png" alt="" width="690" height="338" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/8ce2defc80963bf54ef910b4261023c546729b5c_2_690x338.png 690w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/8ce2defc80963bf54ef910b4261023c546729b5c_2_690x338-600x294.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/8ce2defc80963bf54ef910b4261023c546729b5c_2_690x338-300x147.png 300w" sizes="auto, (max-width: 690px) 100vw, 690px" /></a></p>
<ul>
<li><strong>Attention</strong>, je pense à bien installer la carte de type <a href="https://github.com/thomasloven/lovelace-auto-entities" target="_blank" rel="noopener">auto-entities</a></li>
</ul>
<h3>La carte emploi du temps</h3>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4481" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot1.png" alt="" width="793" height="183" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot1.png 793w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot1-600x138.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot1-300x69.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot1-768x177.png 768w" sizes="auto, (max-width: 793px) 100vw, 793px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4482" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot2.png" alt="" width="380" height="275" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot2.png 380w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot2-300x217.png 300w" sizes="auto, (max-width: 380px) 100vw, 380px" /></p>
<p>Les deux sont super propres, pour le cours annulé, j&rsquo;hésite entre le bouton rouge ou l&rsquo;horaire barré, les deux sont pertinents.</p>
<p>J&rsquo;ai fait un mixte des deux et ajouté un espace avant « conseil de classe », j&rsquo;ai également retravaillé la date dans le titre car il a fallu la trouver.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4483" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot3.png" alt="" width="501" height="181" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot3.png 501w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot3-300x108.png 300w" sizes="auto, (max-width: 501px) 100vw, 501px" /></p>
<p>Le code est :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- type: markdown
  content: &gt;-
    {% set items =
    state_attr('sensor.pronote_xx_coralie_timetable_next_day','lessons')
    %} &lt;div&gt;Emploi du temps du : {{as_timestamp(items[0].start_at) | int |
    timestamp_custom('%d/%m/%Y', true)}} &lt;/div&gt;

    &lt;table&gt;   {% for i in range(0, items | count, 1) %}  &lt;tr&gt; 
      {%- if items[i].canceled != True -%} 
      &lt;td&gt;&lt;mark&gt;{{ items[i].start_time}}&lt;/td&gt; 
      &lt;td&gt;&lt;mark&gt;{{ items[i].end_time }}&lt;/td&gt;&lt;/mark&gt;
      &lt;td&gt;{{ items[i].lesson }}
    {% else %} &lt;td&gt;&lt;del&gt;{{ items[i].start_time }}&lt;/td&gt; &lt;td&gt;&lt;del&gt;{{
    items[i].end_time}}&lt;/td&gt; &lt;td&gt;&lt;del&gt;{{ items[i].lesson }}&lt;/del&gt;&amp;emsp;{%-
    endif -%} {% if items[i].status != None %} &lt;span&gt; {{ items[i].status
    }}&lt;/td&gt; {% endif %} &lt;td&gt; {{items[i].classroom }}&lt;/td&gt; &lt;/tr&gt; {% endfor
    %} &lt;/table&gt; 
  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) &gt; td:nth-child(2) {
          text-align: left;
        }type: ''
</pre>
<h3>La carte des devoirs</h3>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4488" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot4.png" alt="" width="354" height="147" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot4.png 354w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot4-300x125.png 300w" sizes="auto, (max-width: 354px) 100vw, 354px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4489" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot5.png" alt="" width="377" height="141" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot5.png 377w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot5-300x112.png 300w" sizes="auto, (max-width: 377px) 100vw, 377px" /></p>
<p>J&rsquo;ai bien changé d&rsquo;entité et le résultat est :</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4492" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot6.png" alt="" width="497" height="74" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot6.png 497w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot6-300x45.png 300w" sizes="auto, (max-width: 497px) 100vw, 497px" /></p>
<p>Son code :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- type: markdown
  content: |-
    &lt;div&gt;Devoirs&lt;/div&gt;
    &lt;table&gt;
        &lt;tbody&gt;
            {% set items = state_attr('sensor.pronote_xx_coralie_homework','homework') %}
            {%-for i in range(0, items | count, 1) -%}
            &lt;tr&gt;
                &lt;td&gt;
                {%- if items[i].done == true -%}
                    &lt;mark&gt;
                    {{items[i].date.strftime("%d/%m")}}
                    &lt;/mark&gt;
                {%- else -%}
                    &lt;span&gt;
                    {{items[i].date.strftime("%d/%m")}}
                    &lt;/span&gt;
                {% endif %}&lt;/td&gt;              
                &lt;td&gt;{{items[i].subject}}&lt;/td&gt;
                &lt;td&gt;{{items[i].description}}&lt;/td&gt;
            &lt;/tr&gt;
            {% endfor %}
      &lt;/tbody&gt;
    &lt;/table&gt;
  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) &gt; td:nth-child(2) {
          text-align: left;
        }</pre>
<p>nota : Il faudra vérifier s&rsquo;il faut utiliser sensor.pronote_xx_coralie_homework_period ou sensor.pronote_xx_coralie_homework quand il y aura plusieurs jours.</p>
<h3>La carte des évaluations</h3>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4501" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot8.png" alt="" width="477" height="213" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot8.png 477w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot8-300x134.png 300w" sizes="auto, (max-width: 477px) 100vw, 477px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4500" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot7.png" alt="" width="379" height="269" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot7.png 379w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot7-300x213.png 300w" sizes="auto, (max-width: 379px) 100vw, 379px" /></p>
<p>J&rsquo;avais déjà transformé le vert plus en cœur vert, je trouve cela plus sympa. voici la carte avec l&rsquo;intégration :</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4502" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot9.png" alt="" width="432" height="411" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot9.png 432w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot9-300x285.png 300w" sizes="auto, (max-width: 432px) 100vw, 432px" /></p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- type: markdown
  content: &gt;-
    &lt;div&gt;Evaluations&lt;/div&gt; {% set items =
    state_attr('sensor.pronote_xx_coralie_evaluations','evaluations')%}
    &lt;table width='100%'&gt;
      &lt;tbody&gt;
      {% for i in range(0, items | count, 1) %}
      &lt;tr&gt;&lt;td width='10%'&gt;{{ items[i].date.strftime("%d-%m") }}&lt;/td&gt;&lt;td width='60%'&gt;{{ items[i].subject }}&lt;/td&gt;&lt;td width='30%'&gt;
      {% set acquisitions = items[i].acquisitions %}
      {% for j in range(0,acquisitions|count,1) %}{% if acquisitions[j].level == 'Très bonne maîtrise' %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49a.png" alt="💚" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == 'Maîtrise satisfaisante' %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e2.png" alt="🟢" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == "Début de maîtrise" %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == 'Maîtrise fragile'  %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == 'Maîtrise insuffisante'  %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e0.png" alt="🟠" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% else %}?{% endif %}{% endfor %}&lt;/td&gt;&lt;/tr&gt;
      {% endfor %}
    &lt;/tbody&gt; &lt;/table&gt;
  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-weight:normal;
          font-size:1.2em;
          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: 0px 5px 0px 5px;
            text-align: left;
            border-bottom: 0px solid #1c2020;
        }
        tr {
            border-bottom: 0px solid #1c2020;
            line-height: 4px;
        }
        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) &gt; td:nth-child(2) {
          text-align: left;
        }
</pre>
<h3>La carte des absences</h3>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4505" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot10.png" alt="" width="377" height="269" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot10.png 377w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot10-300x214.png 300w" sizes="auto, (max-width: 377px) 100vw, 377px" /></p>
<p>Elle est parfaite, pour caler au design des autres cartes, le résultat donne :</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4506" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot11.png" alt="" width="784" height="127" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot11.png 784w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot11-600x97.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot11-300x49.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot11-768x124.png 768w" sizes="auto, (max-width: 784px) 100vw, 784px" /></p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- type: markdown
  content: &gt;-
    &lt;div&gt;Absences&lt;/div&gt;&lt;table&gt; 

    {% set items =
    state_attr('sensor.pronote_xxxx_coralie_absences','absences') %}

    {% for i in range(0, items | count, 1) %}

    &lt;tr&gt;

    {%- if items[i].justified == True -%}

    &lt;td&gt; &lt;mark&gt; {{ items[i].from.strftime("%d-%m") }}&lt;/mark&gt;&lt;/td&gt;

    {% else %}

    &lt;td&gt; &lt;span&gt;{{ items[i].from.strftime("%d-%m") }}&lt;/span&gt;&lt;/td&gt; 

    {%- endif -%} 

    &lt;td&gt;{{ items[i].hours }}&lt;/td&gt;

    &lt;td&gt;{{ items[i].reason }}&lt;/td&gt;

    {% endfor %}
  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-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) &gt; td:nth-child(2) {
          text-align: left;
        }
</pre>
<h3>Carte du Menu de la cantine</h3>
<p>V6.0.6 minimum requis</p>
<p><a href="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-5029" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine.png" alt="" width="1049" height="606" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine.png 1049w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine-600x347.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine-300x173.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine-1024x592.png 1024w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronotecantine-768x444.png 768w" sizes="auto, (max-width: 1049px) 100vw, 1049px" /></a></p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">type: markdown
content: |-
  &lt;div&gt;Menus Cantine&lt;/div&gt;
  &lt;table&gt;
      &lt;tbody&gt;
  {% set items = state_attr('sensor.pronote_xxx_menus','menus') %}
    &lt;tr&gt;
    &lt;td&gt;&lt;h4&gt;Date&lt;/td&gt;
    &lt;td&gt;&lt;h4&gt;Entrée&lt;/td&gt;
    &lt;td&gt;&lt;h4&gt;Plat principal&lt;/td&gt;
    &lt;td&gt;&lt;h4&gt;Accompagnement&lt;/td&gt;
    &lt;td&gt;&lt;h4&gt;Fromage&lt;/td&gt;
    &lt;td&gt;&lt;h4&gt;Dessert&lt;/td&gt;
    &lt;/tr&gt;
  {% for i in range(0, items | count, 1) %}
    {% if items[i].is_lunch == True %}
    &lt;tr&gt;
    &lt;td&gt;      
    &lt;mark&gt;  
    {{ items[i].date | as_datetime | as_timestamp | timestamp_custom('%d/%m') }}
    &lt;/mark&gt;
    &lt;/td&gt;
    &lt;td&gt; 
      {% for entry in items[i].first_meal %}
       {{ entry.name }}
      {% endfor %}
    &lt;/td&gt;
    &lt;td&gt; 
      {% for main in items[i].main_meal %}
        {{ main.name }}
      {% endfor %}
    &lt;/td&gt;
    &lt;td&gt;
      {% if items[i].side_meal %}
        {% for side in items[i].side_meal %}
          {{ side.name }}
        {% endfor %}
      {% else %}
        PAS_DISPO
      {% endif %}
    &lt;/td&gt;
    &lt;td&gt;
      {% for cheese in items[i].cheese %}
        {{ cheese.name }}
      {% endfor %}
    &lt;/td&gt;
    &lt;td&gt;
      {% for dessert in items[i].dessert %}
        {{ dessert.name }}
      {% endfor %}
    &lt;/td&gt;
      {% endif %}
  {% endfor %}
    &lt;/tbody&gt;
  &lt;/table&gt;
card_mod:
  style:
    .: |
      ha-card ha-markdown {
        padding:0px
      }
      ha-card ha-markdown.no-header {
        padding:10px
      }
    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-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) &gt; td:nth-child(2) {
        text-align: left;
      }
</pre>
<p>&nbsp;</p>
<h3>Ajout d&rsquo;informations complémentaires</h3>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4516" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/e3f57b33ee45aa223a3b18a8e2d975136d491fb0.png" alt="" width="521" height="181" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/e3f57b33ee45aa223a3b18a8e2d975136d491fb0.png 521w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/e3f57b33ee45aa223a3b18a8e2d975136d491fb0-300x104.png 300w" sizes="auto, (max-width: 521px) 100vw, 521px" /></p>
<p>Grace à l&rsquo;excellente idée du <a href="https://github.com/dathosim/Pronote2Homeassistant" target="_blank" rel="noopener">script de @dathosim</a>, je vais ajouter des templates qui me donne ces informations, code à placer dans template</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- sensor:
      - name: Dernière mise à jour de Pronote
        unique_id: sensor.derniere_mise_a_jour_de_pronote
        icon: "mdi:update"
        state: "{{ state_attr('sensor.pronote_xx_coralie','updated_at').strftime('%d-%m-%Y à %H:%M') }}"        
        
  - sensor:
      - name: Début des cours de Coralie - Demain
        unique_id: sensor.debut_des_cours_de_coralie_demain
        icon: "mdi:clock-time-five-outline"
        state: &gt;-            
                {% if state_attr('sensor.pronote_xx_coralie_timetable_tomorrow', 'lessons')[0] is defined %}
                    {{state_attr('sensor.pronote_xx_coralie_timetable_tomorrow', 'lessons')[0]['start_at'].strftime('%H:%M')}}
                {% else %}
                    Pas cours
                {% endif %}                 
  - sensor:
      - name: Début des cours de Coralie - Aujourd'hui
        unique_id: sensor.debut_des_cours_de_coralie_aujourd_hui
        icon: "mdi:clock-time-five-outline"
        state: &gt;-            
                {% if state_attr('sensor.pronote_xx_coralie_timetable_today', 'lessons')[0] is defined %}
                    {{state_attr('sensor.pronote_xx_coralie_timetable_today', 'lessons')[0]['start_at'].strftime('%H:%M')}}
                {% else %}
                    Pas cours
                {% endif %}</pre>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Résultat final </h3>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4513" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot00.png" alt="" width="1532" height="781" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot00.png 1532w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot00-600x306.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot00-300x153.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot00-1024x522.png 1024w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/06/pronot00-768x392.png 768w" sizes="auto, (max-width: 1532px) 100vw, 1532px" /></p>
<p>Code final de la tuile complète :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">type: horizontal-stack
columns: 1
square: false
cards:
  - type: vertical-stack
    cards:
      - type: markdown
        content: &gt;-
          {% set items =
          state_attr('sensor.pronote_xx_coralie_timetable_today','lessons')
          %} &lt;div&gt;Emploi du temps du : {{as_timestamp(items[0].start_at) | int |
          timestamp_custom('%d/%m/%Y', true)}} &lt;/div&gt;

          &lt;table&gt;   {% for i in range(0, items | count, 1) %}  &lt;tr&gt; 
            {%- if items[i].canceled != True -%} 
            &lt;td&gt;&lt;mark&gt;{{ items[i].start_time}}&lt;/td&gt; 
            &lt;td&gt;&lt;mark&gt;{{ items[i].end_time }}&lt;/td&gt;&lt;/mark&gt;
            &lt;td&gt;{{ items[i].lesson }}
          {% else %} &lt;td&gt;&lt;del&gt;{{ items[i].start_time }}&lt;/td&gt; &lt;td&gt;&lt;del&gt;{{
          items[i].end_time}}&lt;/td&gt; &lt;td&gt;&lt;del&gt;{{ items[i].lesson }}&lt;/del&gt;&amp;emsp;{%-
          endif -%} {% if items[i].status != None %} &lt;span&gt; {{ items[i].status
          }}&lt;/td&gt; {% endif %} &lt;td&gt; {{items[i].classroom }}&lt;/td&gt; &lt;/tr&gt; {% endfor
          %} &lt;/table&gt; 
        card_mod:
          style:
            .: |
              ha-card ha-markdown {
                padding:0px
              }
              ha-card ha-markdown.no-header {
                padding:10px
              }
            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-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) &gt; td:nth-child(2) {
                text-align: left;
              }
      - type: markdown
        content: &gt;-
          {% set items =
          state_attr('sensor.pronote_xx_coralie_timetable_next_day','lessons')
          %} &lt;div&gt;Emploi du temps du : {{as_timestamp(items[0].start_at) | int |
          timestamp_custom('%d/%m/%Y', true)}} &lt;/div&gt;

          &lt;table&gt;   {% for i in range(0, items | count, 1) %}  &lt;tr&gt; 
            {%- if items[i].canceled != True -%} 
            &lt;td&gt;&lt;mark&gt;{{ items[i].start_time}}&lt;/td&gt; 
            &lt;td&gt;&lt;mark&gt;{{ items[i].end_time }}&lt;/td&gt;&lt;/mark&gt;
            &lt;td&gt;{{ items[i].lesson }}
          {% else %} &lt;td&gt;&lt;del&gt;{{ items[i].start_time }}&lt;/td&gt; &lt;td&gt;&lt;del&gt;{{
          items[i].end_time}}&lt;/td&gt; &lt;td&gt;&lt;del&gt;{{ items[i].lesson }}&lt;/del&gt;&amp;emsp;{%-
          endif -%} {% if items[i].status != None %} &lt;span&gt; {{ items[i].status
          }}&lt;/td&gt; {% endif %} &lt;td&gt; {{items[i].classroom }}&lt;/td&gt; &lt;/tr&gt; {% endfor
          %} &lt;/table&gt; 
        card_mod:
          style:
            .: |
              ha-card ha-markdown {
                padding:0px
              }
              ha-card ha-markdown.no-header {
                padding:10px
              }
            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-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) &gt; td:nth-child(2) {
                text-align: left;
              }
      - type: markdown
        content: |-
          &lt;div&gt;Devoirs&lt;/div&gt;
          &lt;table&gt;
              &lt;tbody&gt;
                  {% set items = state_attr('sensor.pronote_xx_coralie_homework','homework') %}
                  {%-for i in range(0, items | count, 1) -%}
                  &lt;tr&gt;
                      &lt;td&gt;
                      {%- if items[i].done == true -%}
                          &lt;mark&gt;
                          {{items[i].date.strftime("%d/%m")}}
                          &lt;/mark&gt;
                      {%- else -%}
                          &lt;span&gt;
                          {{items[i].date.strftime("%d/%m")}}
                          &lt;/span&gt;
                      {% endif %}&lt;/td&gt;              
                      &lt;td&gt;{{items[i].subject}}&lt;/td&gt;
                      &lt;td&gt;{{items[i].description}}&lt;/td&gt;
                  &lt;/tr&gt;
                  {% endfor %}
            &lt;/tbody&gt;
          &lt;/table&gt;
        card_mod:
          style:
            .: |
              ha-card ha-markdown {
                padding:0px
              }
              ha-card ha-markdown.no-header {
                padding:10px
              }
            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-weight:normal;
                font-size:1.2em;
                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) &gt; td:nth-child(2) {
                text-align: left;
              }
      - type: markdown
        content: &gt;-
          &lt;div&gt;Absences&lt;/div&gt;&lt;table&gt; 

          {% set items =
          state_attr('sensor.pronote_xx_coralie_absences','absences') %}

          {% for i in range(0, items | count, 1) %}

          &lt;tr&gt;

          {%- if items[i].justified == True -%}

          &lt;td&gt; &lt;mark&gt; {{ items[i].from.strftime("%d-%m") }}&lt;/mark&gt;&lt;/td&gt;

          {% else %}

          &lt;td&gt; &lt;span&gt;{{ items[i].from.strftime("%d-%m") }}&lt;/span&gt;&lt;/td&gt; 

          {%- endif -%} 

          &lt;td&gt;{{ items[i].hours }}&lt;/td&gt;

          &lt;td&gt;{{ items[i].reason }}&lt;/td&gt;

          {% endfor %}
        card_mod:
          style:
            .: |
              ha-card ha-markdown {
                padding:0px
              }
              ha-card ha-markdown.no-header {
                padding:10px
              }
            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-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) &gt; td:nth-child(2) {
                text-align: left;
              }
      - type: custom:auto-entities
        card:
          type: entities
        filter:
          include:
            - entity_id: binary_sensor.ouvrable_aujourd_hui
            - entity_id: binary_sensor.ouvrable_demain
            - entity_id: binary_sensor.vacances_scolaires_aujourdhui
            - entity_id: binary_sensor.vacances_scolaires_demain
            - entity_id: sensor.debut_des_cours_de_coralie_aujourd_hui
            - entity_id: sensor.debut_des_cours_de_coralie_demain
            - entity_id: sensor.coralie_next_alarm
      - type: custom:auto-entities
        card:
          type: entities
        filter:
          include:
            - entity_id: sensor.derniere_mise_a_jour_de_pronote
  - type: vertical-stack
    cards:
      - type: markdown
        content: &gt;-
          &lt;div&gt;Evaluations&lt;/div&gt; {% set items =
          state_attr('sensor.pronote_xx_coralie_evaluations','evaluations')%}
          &lt;table width='100%'&gt;
            &lt;tbody&gt;
            {% for i in range(0, items | count, 1) %}
            &lt;tr&gt;&lt;td width='10%'&gt;{{ items[i].date.strftime("%d-%m") }}&lt;/td&gt;&lt;td width='60%'&gt;{{ items[i].subject }}&lt;/td&gt;&lt;td width='30%'&gt;
            {% set acquisitions = items[i].acquisitions %}
            {% for j in range(0,acquisitions|count,1) %}{% if acquisitions[j].level == 'Très bonne maîtrise' %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49a.png" alt="💚" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == 'Maîtrise satisfaisante' %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e2.png" alt="🟢" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == "Début de maîtrise" %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == 'Maîtrise fragile'  %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% elif acquisitions[j].level == 'Maîtrise insuffisante'  %}<img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e0.png" alt="🟠" class="wp-smiley" style="height: 1em; max-height: 1em;" />{% else %}?{% endif %}{% endfor %}&lt;/td&gt;&lt;/tr&gt;
            {% endfor %}
          &lt;/tbody&gt; &lt;/table&gt;
        card_mod:
          style:
            .: |
              ha-card ha-markdown {
                padding:0px
              }
              ha-card ha-markdown.no-header {
                padding:10px
              }
            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-weight:normal;
                font-size:1.2em;
                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: 0px 5px 0px 5px;
                  text-align: left;
                  border-bottom: 0px solid #1c2020;
              }
              tr {
                  border-bottom: 0px solid #1c2020;
                  line-height: 4px;
              }
              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) &gt; td:nth-child(2) {
                text-align: left;
              }
</pre>
<p>&nbsp;</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>明天上学？</title>
		<link href="">https://www.sigalou-domotique.fr/zh/ecole-demain</link>
		
		<dc:creator><![CDATA[Sigalou]]></dc:creator>
		<pubdate>SAT, 2023年5月20日 08:19:03 + 0000</pubdate>
				<category><![CDATA[Domotique]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[Retex]]></category>
		<category><![CDATA[Développement]]></category>
		<category><![CDATA[Pronote]]></category>
		<guid ispermalink="false">https://www.sigalou-domotique.fr/?p=4029</guid>

					<description><![CDATA[Dans le cadre de l&#8217;intégration de Pronote, afin de permettre la création automatique d&#8217;une alarme demain matin ou de bien caler la mise à jour de Pronote pour ne pas l&#8217;actualiser les jours de vacances scolaires, j&#8217;ai besoin de savoir si nous sommes en congés scolaire et s&#8217;il y a école demain. Un jour ouvrable [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p>Dans le cadre de l&rsquo;<a href="https://www.sigalou-domotique.fr/integrer-pronote-a-son-home-assistant" target="_blank" rel="noopener">intégration de Pronote</a>, afin de permettre la création automatique d&rsquo;une alarme demain matin ou de bien caler la mise à jour de Pronote pour ne pas l&rsquo;actualiser les jours de vacances scolaires, j&rsquo;ai besoin de savoir si nous sommes en congés scolaire et s&rsquo;il y a école demain.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4030" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote18.png" alt="" width="441" height="172" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote18.png 441w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote18-300x117.png 300w" sizes="auto, (max-width: 441px) 100vw, 441px" /><span id="more-4029"></span></p>
<h2>Un jour ouvrable ?</h2>
<p>Pour savoir si nous sommes un jour ouvrable ou pas, il suffit d&rsquo;installer l&rsquo;extension <a href="https://www.home-assistant.io/integrations/workday/" target="_blank" rel="noopener">Workday</a></p>
<p>Rien de plus simple, tout est dans <a href="https://www.home-assistant.io/integrations/workday/" target="_blank" rel="noopener">la documentation.</a></p>
<p><a href="https://my.home-assistant.io/redirect/config_flow_start?domain=workday" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3632" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/04/addintegration.png" alt="" width="202" height="27" /></a></p>
<p>Je l&rsquo;ajoute deux fois. Pour avoir demain, on ajoute avec un décalage de 1.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4052" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour1.png" alt="" width="206" height="159" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4054" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour2.png" alt="" width="692" height="204" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour2.png 692w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour2-600x177.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour2-300x88.png 300w" sizes="auto, (max-width: 692px) 100vw, 692px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4057" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour3.png" alt="" width="437" height="96" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour3.png 437w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour3-300x66.png 300w" sizes="auto, (max-width: 437px) 100vw, 437px" /></p>
<p><em>Désactivé = jour non ouvrable</em></p>
<h2>En vacances scolaires ?</h2>
<p>Pour savoir si nous sommes en vacances scolaire ou pas, il faut interroger l&rsquo;API du ministère de l&rsquo;éducation nationale. Le script utilisé est en V1, il il a une V2.0, si j&rsquo;ai un peu de temps, je passerai sur le V2.0 plus tard.</p>
<ul>
<li>V1 : https://data.education.gouv.fr/api/v1/console/datasets/1.0/search/</li>
<li>V2.0 : https://data.education.gouv.fr/api/explore/v2.0/console</li>
</ul>
<p>Ressource utilisée pour ces capteurs (merci à son auteur):</p>
<ul>
<li>https://github.com/papo-o/home-assistant-config/blob/master/integrations/vacances_scolaires.yaml</li>
<li>https://pon.fr/home-assistant-vacances-scolaires/</li>
</ul>
<h3>Ajout d&rsquo;un sensor &lsquo;vacances_scolaires&rsquo;</h3>
<p>Dans mon fichier <a href="https://github.com/sigalou/home-assistant-config-fr/blob/main/sensors.yaml" target="_blank" rel="noopener">sensors.yaml</a>, j&rsquo;ajoute ce capteur :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- platform: rest
  scan_interval: '00:30:00'
  name: vacances_scolaires
  json_attributes_path: "$.records[0].fields"
  json_attributes:
    - start_date
    - end_date
    - description
  resource_template: |-
    {% set location = 'Aix-Marseille' %}
    {% set rows = '1'%}
    {% set aujourdhui = now().strftime('%Y-%m-%d')%}
    {% set dayOfYear =  now().strftime('%j') %}
    {% set year =  now().strftime('%Y') | int %}
    {% set lastYear = year - 1 %}
    {% set nextYear = year + 1 %}
    {% if dayOfYear &gt; '244' %}
    {% set schoolYear = (year | string) + "-" + (nextYear | string) %}
    {%- else -%}
    {% set schoolYear = (lastYear | string) + "-" + (year | string) %}
    {%- endif %}
    https://data.education.gouv.fr/api/records/1.0/search/?dataset=fr-en-calendrier-scolaire&facet=start_date&facet=end_date&rows={{rows}}&refine.location={{location}}&sort=-end_date&q=end_date%3E={{aujourdhui}}
  value_template: |-
    {% set aujourdhui = now().strftime('%Y-%m-%d')%}
    {% for record in value_json.records -%}
    {% if aujourdhui &gt;= record.fields.start_date and aujourdhui &lt;= record.fields.end_date %} 
    {%- if record.fields.description %}{{record.fields.description}} jusqu'au {{ as_timestamp(record.fields.end_date) | timestamp_custom('%d-%m-%Y') }} {% endif %}
    {% else %} 
    {%- if record.fields.end_date &gt; aujourdhui and record.fields.description %} prochaines : {{record.fields.description}} {{ as_timestamp(record.fields.start_date) | timestamp_custom('%d-%m-%Y') }}{% endif %}
    {% endif %}
    {%- endfor %}    </pre>
<p>Evidemment, il faut changer l&rsquo;académie : &lsquo;Corse&rsquo;, &lsquo;Polynésie&rsquo;, &lsquo;Nouvelle Calédonie&rsquo;, &lsquo;Guyane&rsquo;, &lsquo;Aix-Marseille&rsquo;, &lsquo;Amiens&rsquo;, &lsquo;Besançon&rsquo;, &lsquo;Bordeaux&rsquo;, &lsquo;Clermont-Ferrand&rsquo;, &lsquo;Créteil&rsquo;, &lsquo;Dijon&rsquo;, &lsquo;Grenoble&rsquo;, &lsquo;Lille&rsquo;, &lsquo;Limoges&rsquo;, &lsquo;Lyon&rsquo;, &lsquo;Montpellier&rsquo;, &lsquo;Nancy-Metz&rsquo;, &lsquo;Nantes&rsquo;, &lsquo;Nice&rsquo;, &lsquo;Orléans-Tours&rsquo;, &lsquo;Paris&rsquo;, &lsquo;Poitiers&rsquo;, &lsquo;Reims&rsquo;, &lsquo;Rennes&rsquo;, &lsquo;Strasbourg&rsquo;, &lsquo;Toulouse&rsquo;, &lsquo;Versailles&rsquo;, &lsquo;Mayotte&rsquo;, &lsquo;Réunion&rsquo;, &lsquo;Martinique&rsquo;, &lsquo;Saint Pierre et Miquelon&rsquo;, &lsquo;Wallis et Futuna&rsquo;, &lsquo;Caen&rsquo;, &lsquo;Rouen&rsquo;, &lsquo;Guadeloupe&rsquo;, &lsquo;Normandie&rsquo; </p>
<h4>Résultat de ce capteur</h4>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4035" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote20.png" alt="" width="845" height="82" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote20.png 845w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote20-600x58.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote20-300x29.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote20-768x75.png 768w" sizes="auto, (max-width: 845px) 100vw, 845px" /></p>
<p>Ces informations doivent permettre d&rsquo;extraire deux informations sous forme de binary_sensor qui pourront être utilisés dans les automatisations ou scripts.</p>
<h3>Ajout de deux capteurs binaires Vacances Scolaires aujourd&rsquo;hui et Vacances Scolaires demain</h3>
<blockquote>
<p><em>Mise à jour le 03/10/2023</em>, grâce à la <a href="https://forum.hacf.fr/t/vacances-scolaires-api-data-education-gouv-fr/28810/4" target="_blank" rel="noopener">remarque pertinente</a> de <a href="https://forum.hacf.fr/u/giga77/summary" target="_blank" rel="noopener">Giga77</a>, je corrige le code ci-dessous et je remplace</p>
<p><code>states.sensor.vacances_scolaires.attributes["start_date"]</code><br />par<br /><code>state_attr('sensor.vacances_scolaires', 'start_date')</code></p>
</blockquote>
<p>Dans mon fichier <a href="https://github.com/sigalou/home-assistant-config-fr/blob/main/templates.yaml" target="_blank" rel="noopener">templates.yaml</a>, j&rsquo;ajoute ces capteurs :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- binary_sensor:
    - name: vacances_scolaires_aujourdhui
      unique_id: binary_sensor.vacances_scolaires_aujourdhui
      state: |-
        {% set aujourdhui = now().strftime('%Y-%m-%d')%}
        {% if aujourdhui &lt; state_attr('sensor.vacances_scolaires', 'start_date') or aujourdhui &gt; state_attr('sensor.vacances_scolaires', 'end_date') %}
        false
        {% else %} 
        true
        {% endif %}

- binary_sensor:
    - name: vacances_scolaires_demain
      unique_id: binary_sensor.vacances_scolaires_demain
      state: |-
        {% set demain = (as_timestamp(now()) + (24*3600)) | timestamp_custom('%Y-%m-%d', True) %}
        {% if demain &lt; state_attr('sensor.vacances_scolaires', 'start_date') or demain &gt; state_attr('sensor.vacances_scolaires', 'end_date') %} 
        false
        {% else %} 
        true
        {% endif %}     </pre>
<p>&nbsp;</p>
<h4>Résultat de ces capteurs (testé un jour de vacance)</h4>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4037" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote21.png" alt="" width="849" height="106" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote21.png 849w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote21-600x75.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote21-300x37.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote21-768x96.png 768w" sizes="auto, (max-width: 849px) 100vw, 849px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4042" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote22.png" alt="" width="425" height="67" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote22.png 425w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/pronote22-300x47.png 300w" sizes="auto, (max-width: 425px) 100vw, 425px" /></p>
<h3>Un binary_sensor pour autoriser la mise à jour Pronote</h3>
<p>Il n&rsquo;y a pas d&rsquo;utilité à mettre à jour Pronote pendant les vacances ou les jours non-ouvrables.</p>
<p>J&rsquo;ai créé un binary_sensor qui autorisera ainsi la mise à jour ou pas de Pronote.</p>
<p>Dans mon fichier <a href="https://github.com/sigalou/home-assistant-config-fr/blob/main/templates.yaml" target="_blank" rel="noopener">templates.yaml</a>, j&rsquo;ajoute ce capteur :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">- binary_sensor:
    - name: autoriser_miseajour_pronote
      unique_id: binary_sensor.autoriser_miseajour_pronote
      state: "{{ is_state('binary_sensor.vacances_scolaires_aujourdhui', 'off') and is_state('binary_sensor.ouvrable_aujourd_hui', 'on')}}"</pre>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4062" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour4.png" alt="" width="794" height="45" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour4.png 794w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour4-600x34.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour4-300x17.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour4-768x44.png 768w" sizes="auto, (max-width: 794px) 100vw, 794px" /></p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4063" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour5.png" alt="" width="448" height="103" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour5.png 448w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour5-300x69.png 300w" sizes="auto, (max-width: 448px) 100vw, 448px" /></p>
<h3>Ajouter une condition au lancement de la mise à jour</h3>
<p>Comme spécifié dans le <a href="https://www.sigalou-domotique.fr/integrer-pronote-a-son-home-assistant" target="_blank" rel="noopener">tuto de l&rsquo;intégration Pronote</a>, on ajoute une automatisation pour lancer régulièrement la mise à jour Pronote, et avec la nouvelle entité binary_sensor.autoriser_miseajour_pronote, on va autoriser la mise à jour que si binary_sensor.autoriser_miseajour_pronote=on</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-4067" src="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour6.png" alt="" width="803" height="348" srcset="https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour6.png 803w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour6-600x260.png 600w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour6-300x130.png 300w, https://www.sigalou-domotique.fr/wp-content/uploads/2023/05/jour6-768x333.png 768w" sizes="auto, (max-width: 803px) 100vw, 803px" /></p>
<p>Voici le code YAML complet de l&rsquo;automatisation</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">alias: Mise à jour Pronote
description: ""
trigger:
  - platform: time_pattern
    hours: /4
condition:
  - condition: state
    entity_id: binary_sensor.autoriser_miseajour_pronote
    state: "on"
action:
  - service: shell_command.update_pronote
    data: {}
mode: single</pre>
<p>Ainsi, les jours ouvrables, hors vacances scolaires, l&rsquo;autorisation s&rsquo;active et Pronote se mettra à jour toutes les 4 heures.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>将PRONOTE整合到您的家庭助理中</title>
		<link href="">https://www.sigalou-domotique.fr/zh/integrer-pronote-a-son-home-assistant</link>
		
		<dc:creator><![CDATA[Sigalou]]></dc:creator>
		<pubdate>蒙，2023年5月15日 18:48:05 + 0000</pubdate>
				<category><![CDATA[Domotique]]></category>
		<category><![CDATA[Home Assistant]]></category>
		<category><![CDATA[Retex]]></category>
		<category><![CDATA[Pronote]]></category>
		<guid ispermalink="false">https://www.sigalou-domotique.fr/?p=3941</guid>

					<description><![CDATA[Pronote est une application génialissime de la société Index Education qui équipe une majorité des établissements scolaires. Si vous ne connaissez pas, passez votre chemin, c&#8217;est que vous n&#8217;avez pas besoin de l&#8217;intégrer à votre domotique.   Attention, ce Retex est dépassé, en effet depuis Juin 2023, une intégration (merci vient Delphiki) s&#8217;occuper de tout [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p><a href="https://www.index-education.com/fr/logiciel-gestion-vie-scolaire.php" target="_blank" rel="noopener">Pronote</a> est une application génialissime de la société Index Education qui équipe une majorité des établissements scolaires.</p>
<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>
<p>Si vous ne connaissez pas, passez votre chemin, c&rsquo;est que vous n&rsquo;avez pas besoin de l&rsquo;intégrer à votre domotique.<span id="more-3941"></span></p>
<table style="width: 100%; border-collapse: collapse;" border="4">
<tbody>
<tr>
<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" />
<p><em> </em></p>
</td>
<td style="width: 80%;">
<p><em>Attention, ce Retex est dépassé, en effet depuis Juin 2023, une <a href="https://github.com/delphiki/hass-pronote" target="_blank" rel="noopener">intégration</a> (merci vient <a href="https://forum.hacf.fr/u/delphiki" target="_blank" rel="noopener">Delphiki</a>) s&rsquo;occuper de tout ce qui est décrit ci-dessous. Certains liens ou fichiers de mon HA risque de ne plus correspondre avec la suite de ce texte. Je conseille évidemment d&rsquo;utiliser l&rsquo;intégration.</em></p>
<p><em>Voici le dernier Retex : <a href="https://www.sigalou-domotique.fr/travail-sur-les-cartes-ha-de-pronote" target="_blank" rel="noopener">Je travaille sur les cartes HA de Pronote</a></em></p>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<p>Cette intégration est basé sur le script de Dathosim (Merci beaucoup !!)<br /><a href="https://github.com/dathosim/Pronote2Homeassistant" target="_blank" rel="noopener">https://github.com/dathosim/Pronote2Homeassistant</a></p>
<p>J&rsquo;ai modifié quelques lignes du code, soit pour adapter à mon utilisation soit pour adapter aux nouvelles normes de HA (platform: template/sensors: devenue template:/sensor par exemple)</p>
<h3>Installation de la librairie PronotePy</h3>
<p>Il s&rsquo;agit d&rsquo;une librairie python développé en open source : <a href="https://github.com/bain3/pronotepy">pronotepy</a></p>
<p>Pour installer cette librairie, lancer en ligne de commande :</p>
<blockquote>
<p>pip install pronotepy</p>
</blockquote>
<p>ou pour avoir la dernière version (déconseillé) :</p>
<blockquote>
<p>pip install https://github.com/bain3/pronotepy/archive/refs/heads/master.zip</p>
</blockquote>
<p>De temps en temps, il faut penser à lancer un petit coup de :</p>
<blockquote>
<p>pip install &#8211;upgrade pronotepy</p>
</blockquote>
<h3 dir="auto" tabindex="-1">Installation du script python de Dathosim</h3>
<p>Aller dans le dossier /config de votre HA et y créer un nouveau dossier qui peut s&rsquo;appeler <strong>python_scripts</strong> et qui contiendra vos scripts personnalisés.</p>
<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>
<p>Dans ce dossier /config/python_scripts, y placer les fichiers <a href="https://github.com/dathosim/Pronote2Homeassistant/blob/main/pronote.py" target="_blank" rel="noopener">pronote.py</a> et <a href="https://github.com/dathosim/Pronote2Homeassistant/blob/main/config.ini" target="_blank" rel="noopener">config.ini</a> de la distribution <a href="https://github.com/dathosim/Pronote2Homeassistant" target="_blank" rel="noopener">Pronote2Homeassistant</a>.</p>
<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>
<h3>Configurer le script Python</h3>
<p>Il est nécessaire d&rsquo;éditer le fichier <strong>config.ini</strong> et d&rsquo;y ajouter les informations spécifiques.</p>
<h4>Configuration spécifique Sigalou</h4>
<p>J&rsquo;ai rencontré des soucis dans l&rsquo;identification avec l&rsquo;ENT atrium_sud. Pour une raison que j&rsquo;ignore, j&rsquo;ai dû modifier le script Python. Je vais transmettre ces informations à Dathosim pour voir ce qu&rsquo;il se passe. Je donne ici mes modifications, elles pourront être utiles. J&rsquo;ai modifié la ligne 57.</p>
<pre class="EnlighterJSRAW" data-enlighter-language="generic"># client = (pronotepy.ParentClient if type_compte == 'parent' else pronotepy.Client)(url, username, password, ent)
client = (pronotepy.ParentClient if type_compte == 'parent' else pronotepy.Client)('https://0xx0xxxx.index-education.net/pronote/mobile.parent.html', username = 'xxxxx', password='yyyyy', ent=atrium_sud)</pre>
<ul>
<li>Pour avoir l&rsquo;URL, je suis allé sur pronote regarder l&rsquo;url proposée lorsqu&rsquo;on flash le QR code.</li>
<li>Pour xxxx il faut mettre le nom d&rsquo;utilisateur et yyyy le mot de passe.</li>
</ul>
<p>Avec cela, le script fonctionne parfaitement. Si vous avez un peu plus de chance que moi, tout devrait bien fonctionner avec le script fourni en complétant le fichier de configuration avec vos identifiants.</p>
<h3>Lancer le script</h3>
<p>C&rsquo;est là qu&rsquo;il faut croiser les doigts pour vérifier que tout se passe bien.</p>
<p>Il faut se connecter en ligne de commande SSH, aller dans le dossier phyton_scripts précédemment créé avec un :</p>
<blockquote>
<p>cd /config/python_scripts</p>
</blockquote>
<p>cd /usr/share/hassio/homeassistant/python_scripts/ (chez Dathosim)</p>
<p>puis lancer le script avec :</p>
<blockquote>
<p>python3 pronote.py</p>
</blockquote>
<p>S&rsquo;il ne se passe rien de spécial, pas de message d&rsquo;erreur c&rsquo;est que c&rsquo;est OK, le script a bien déroulé.</p>
<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>
<p>Quand tout s&rsquo;est bien passé, un fichier <strong>pronote_prenomenfant.json</strong> est créé dans /config/www</p>
<p>C&rsquo;est ce fichier qui sera interrogé par HA pour récupérer les informations.</p>
<h3>Automatiser le lancement du script</h3>
<p>Il y a la méthode classique, probablement préférée des puristes Linux, c&rsquo;est à dire d&rsquo;ajouter un crontab </p>
<blockquote>
<p>*/10 * * * * /usr/bin/python3 /usr/share/hassio/homeassistant/python_scripts/pronote.py &gt; /tmp/pronote.log 2&gt;&amp;1</p>
</blockquote>
<p>ou en fonction de votre système :</p>
<blockquote>
<p>*/10 * * * * /config/python_scripts/pronote.py &gt; /tmp/pronote.log 2&gt;&amp;1</p>
</blockquote>
<p>Ce n&rsquo;est pas la méthode que j&rsquo;ai choisie, j&rsquo;ai souhaiter utiliser à 100% Home Assistant et dans ma phase d&rsquo;apprentissage, j&rsquo;ai cherché comment lancer un cron et comment lancer un script Python.</p>
<h4>Ajout d&rsquo;une automatisation qui lance une commande shell</h4>
<p>HA appelle cela un timer pattern</p>
<p>J&rsquo;ajoute un fichier shell_command.yaml à mon fichier configuration.yaml </p>
<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>
<p>Dans ce fichier shell_command.yaml, j&rsquo;ajoute :</p>
<blockquote>
<p>update_pronote : python3 /config/python_scripts/pronote.py</p>
</blockquote>
<p>Dans Automatisations, j&rsquo;ajoute une nouvelle automatisation qui va lancer le script update_pronote </p>
<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>
<p>Le déclencheur est un déclenchement toutes les 10 minutes</p>
<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>
<p>et l&rsquo;action est une commande shell qui lance update_pronote</p>
<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>
<p>En mode YAML, cela donne :</p>
<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>
<p>Toutes les 10 minutes, j&rsquo;ai donc le fichier /config/www/pronote_enfant.json qui est généré.</p>
<h3>Récupérer les données</h3>
<p>C&rsquo;est ensuite HA qui va lancer des requêtes REST pour aller chercher les données</p>
<p>Dathosim donne toutes les requêtes à lancer, elles sont sur :<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>
<p>Il faut bien sur remplacer:</p>
<ul>
<li><strong>demo</strong> par le prénom de l&rsquo;enfant</li>
<li><strong>192.168.XX.XX</strong> par l&rsquo;adresse ip de HA</li>
</ul>
<p>J&rsquo;ai modifié quelques syntaxes ou capteurs (les templates), cf mon fichier <a href="https://github.com/sigalou/home-assistant-config-fr/blob/main/templates.yaml" target="_blank" rel="noopener">templates.yaml</a></p>
<h3>Créer l&rsquo;écran Pronote</h3>
<p>La dernière étape consiste à afficher les sensors qui débutent par pronote&#8230; sur des cartes pour faire un bel écran.</p>
<p>Voici le code de l&rsquo;écran de Dathosim : <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>
<p>Voici mon code :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">type: horizontal-stack
columns: 2
square: false
cards:
  - type: vertical-stack
    cards:
      - type: markdown
        content: |-
          &lt;div&gt;Emploi du temps d'aujourd'hui &lt;/div&gt;
          &lt;table&gt;
              &lt;tbody&gt;
                  {%-for attr in states.sensor.pronote_edt_coralie_aujourdhui.attributes.edt_aujourdhui -%}
                  &lt;tr style="background-color:#FF0000"&gt;&lt;td&gt;
                      {%- if state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['annulation'] == false -%}
                          &lt;mark&gt;
                          {{state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['heure']}}
                          &lt;/mark&gt;
                      {%- else -%}
                          &lt;span&gt;
                          {{state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['heure']}}
                          &lt;/span&gt;
                      {% endif %}&lt;/td&gt;
                      &lt;td&gt;{{state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['heure_fin']}}&lt;/td&gt;
                      &lt;td&gt;
                      {{state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['cours']}}
                      {% if not state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['status'] == None %}&lt;span&gt;{{state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['status']}}&lt;/span&gt;
                      {% endif %}&lt;/td&gt;
                      &lt;td&gt;{{state_attr('sensor.pronote_edt_coralie_aujourdhui', 'edt_aujourdhui')[loop.index-1]['salle']}}&lt;/td&gt;
                  &lt;/tr&gt;
                  {% endfor %}
            &lt;/tbody&gt;
          &lt;/table&gt;
        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) &gt; td:nth-child(2) {
                text-align: left;
              }
      - type: markdown
        content: &gt;-
          &lt;div&gt;Emploi du temps du :
          {{state_attr('sensor.pronote_edt_coralie_prochainjour',
          'edt_prochainjour')[0]['date']}}&lt;/div&gt;

          &lt;table&gt;
              &lt;tbody&gt;
                  {%-for attr in states.sensor.pronote_edt_coralie_prochainjour.attributes.edt_prochainjour -%}
                  &lt;tr style="background-color:#FF0000"&gt;&lt;td&gt;
                      {%- if state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['annulation'] == false -%}
                          &lt;mark&gt;
                          {{state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['heure']}}
                          &lt;/mark&gt;
                      {%- else -%}
                          &lt;span&gt;
                          {{state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['heure']}}
                          &lt;/span&gt;
                      {% endif %}&lt;/td&gt;
                      &lt;td&gt;{{state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['heure_fin']}}&lt;/td&gt;
                      &lt;td&gt;
                      {{state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['cours']}}
                      {% if not state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['status'] == None %}&lt;span&gt;{{state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['status']}}&lt;/span&gt;
                      {% endif %}&lt;/td&gt;
                      &lt;td&gt;{{state_attr('sensor.pronote_edt_coralie_prochainjour', 'edt_prochainjour')[loop.index-1]['salle']}}&lt;/td&gt;
                  &lt;/tr&gt;
                  {% endfor %}
            &lt;/tbody&gt;
          &lt;/table&gt;
        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) &gt; td:nth-child(2) {
                text-align: left;
              }
  - type: markdown
    content: |-
      &lt;div&gt;Devoirs&lt;/div&gt;
      &lt;table&gt;
          &lt;tbody&gt;
              {%-for attr in states.sensor.pronote_devoir_coralie.attributes.devoir -%}
              &lt;tr&gt;
                  &lt;td&gt;
                  {%- if state_attr('sensor.pronote_devoir_coralie', 'devoir')[loop.index-1]['done'] == true -%}
                      &lt;mark&gt;
                      {{state_attr('sensor.pronote_devoir_coralie', 'devoir')[loop.index-1]['date']}}
                      &lt;/mark&gt;
                  {%- else -%}
                      &lt;span&gt;
                      {{state_attr('sensor.pronote_devoir_coralie', 'devoir')[loop.index-1]['date']}}
                      &lt;/span&gt;
                  {% endif %}&lt;/td&gt;              
                  &lt;td&gt;{{state_attr('sensor.pronote_devoir_coralie', 'devoir')[loop.index-1]['title']}}&lt;/td&gt;
                  &lt;td&gt;{{state_attr('sensor.pronote_devoir_coralie', 'devoir')[loop.index-1]['description']}}&lt;/td&gt;
              &lt;/tr&gt;
              {% endfor %}
        &lt;/tbody&gt;
      &lt;/table&gt;
    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) &gt; td:nth-child(2) {
            text-align: left;
          }
  - type: markdown
    content: |-
      &lt;div&gt;Evaluations&lt;/div&gt;
      &lt;table width='100%'&gt;
        &lt;tbody&gt;
        {%-for attr in states.sensor.pronote_eval_coralie.attributes.evaluation -%}
        {% if loop.index &lt; 40  %}
        &lt;tr&gt;
        &lt;td width='10%'&gt;{{attr['date_courte']}}&lt;/td&gt;
        &lt;td width='70%'&gt;{{attr['eval']}}&lt;/td&gt;
        &lt;td width='20%'&gt;
        {%for attr2 in attr.acquisitions-%}{% if attr2['acquisition_niveau'] == "A+"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f49a.png" alt="💚" class="wp-smiley" style="height: 1em; max-height: 1em;" /> {% elif attr2['acquisition_niveau'] == "A"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e2.png" alt="🟢" class="wp-smiley" style="height: 1em; max-height: 1em;" /> {% elif attr2['acquisition_niveau'] == "B+"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26aa.png" alt="⚪" class="wp-smiley" style="height: 1em; max-height: 1em;" />+ {% elif attr2['acquisition_niveau'] == "B"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26aa.png" alt="⚪" class="wp-smiley" style="height: 1em; max-height: 1em;" /> {% elif attr2['acquisition_niveau'] == "C+"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" />+ {% elif attr2['acquisition_niveau'] == "C"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f7e1.png" alt="🟡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> {% elif attr2['acquisition_niveau'] == "D+"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26aa.png" alt="⚪" class="wp-smiley" style="height: 1em; max-height: 1em;" />+ {% elif attr2['acquisition_niveau'] == "D"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/26aa.png" alt="⚪" class="wp-smiley" style="height: 1em; max-height: 1em;" /> {% elif attr2['acquisition_niveau'] == "E"  %} <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f534.png" alt="🔴" class="wp-smiley" style="height: 1em; max-height: 1em;" /> {% else %}{{ attr2['acquisition_niveau']}}  {% endif %}
        {% endfor %}
        &lt;/td&gt;
        &lt;/tr&gt;
        {% endif %}
        {% endfor %}
      &lt;/tbody&gt;
      &lt;/table&gt;
    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) &gt; td:nth-child(2) {
            text-align: left;
          }
</pre>
<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>
<p>A noter :</p>
<p>J&rsquo;ai modifier la couleur des points car la correspondance n&rsquo;était pas bonne avec la configuration du pronote de l&rsquo;établissement de ma fille. Pour le vert plus, j&rsquo;ai mis un coeur vert.</p>
<h2 dir="auto" tabindex="-1">Bonus</h2>
<h3 dir="auto" tabindex="-1">Ajout d&rsquo;une carte de mise à jour</h3>
<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>
<p>Dans l&rsquo;objectif de diminuer la mise à jour, de la passer de toutes les 10 min à toutes les 4 heures, j&rsquo;ai ajouté la carte de l&rsquo;image ci-dessus.</p>
<p>Ainsi, on a le délai depuis la dernière mise à jour et si on veut une mise à jour immédiate, on appui dessus et on lance EXECUTER</p>
<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>
<p>Code de la carte :</p>
<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>
<h3>Limiter la mise à jour aux jours ouvrables</h3>
<p>Après avoir basculé de 10 min à 4 heures la tempo de mise à jour, j&rsquo;ai cherché à limiter cette mise à jour aux jours ouvrables.</p>
<p>Il existe une intégration qui créé un binary_sensor qui nous donne cette information, il s&rsquo;agit de <a href="https://www.home-assistant.io/integrations/workday/" target="_blank" rel="noopener">Workday</a>.</p>
<p>Je n&rsquo;entre pas dans son installation, la doc est archi-simple.</p>
<p>J&rsquo;ai juste ajouté ensuite dans l&rsquo;automatisation une condition :</p>
<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>
<p>Voici le code complet de l&rsquo;automatisation :</p>
<pre class="EnlighterJSRAW" data-enlighter-language="yaml">alias: Mise à jour 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>
<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>
<p><em>Edit</em> : un <a href="https://www.sigalou-domotique.fr/ecole-demain" target="_blank" rel="noopener">nouveau tuto</a> permet de ne déclencher la mise à jour Pronote que les jours ouvrables et hors vacances scolaires.</p>
<h3>Lier Pronote et le déclenchement du reveil Alexa</h3>
<p>Ce sera la prochaine étape</p>
<p>Mais je programmerai cela un dimanche pour avoir une heure de début des cours demain</p>
<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>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>