Pronote dans HA - les notes, devoirs, absences et emploi du temps des enfants

merci pour le coup de main, tout fonctionne grâce à ton aide.

Bjr, j’ai qqc de nouveau pur intégrer dans le script, delay (retards) et information&surveys

    jsondata['delay'] = []
    periods = client.periods
    for period in periods:
        for delay in period.delays:
            jsondata['delay'].append({
                'pid': period.id,
                'periodName': period.name,
                'periodStart': period.start.strftime("%Y/%m/%d"),
                'periodEnd': period.end.strftime("%Y/%m/%d"),
                'delid': delay.id,
                'delayMinutes': delay.minutes,
                'delayJustified': delay.justified,
                'delayJustification': delay.justification,
                'delayReasons': delay.reasons,
            })
            
    informations = client.information_and_surveys()  
    #Transformation des information
    jsondata['informations'] = []
    for information in informations:
        jsondata['informations'].append({
            'id': information.id,
            'author': information.author,            
            'title': information.title,
            'read': information.read,
            'creation_date': information.creation_date.strftime("%Y/%m/%d"),
            'start_date': information.start_date.strftime("%Y/%m/%d"),
            'end_date': information.end_date.strftime("%Y/%m/%d"),
            'category': information.category,
            'survey': information.survey,
            'content': information.content,
            })

Hello Sigalou,

J’ai récupéré ton interface lovelace mais ils n’y a pas les « grades ».

J’ai essayé moi même de les ajouter mais malheuresement tous les éléments s’affichent sur la même ligne.

Tu as essayé de faire une carte pour les notes/grades?

Merci

Il ne l’utilise pas . Mes voilà la mienne

type: markdown
content: |2-
   <div>Note</div><table> 
      {% set items = state_attr('sensor.pronote_xxxxxxxx_grades','grades')%}
    <tr>
    <td><h4>Date<h3></td>
    <td><h4>Cours</td>
    <td><h4>Note</td>
    <td><h4>Class</td>
    <td><h4>Max</td>
    <td><h4>Min</td>
    <td><h4>Coeff</td>
    </tr>
    {% for i in range(0, items | count, 1) %}
    <tr>    
    <td>{{ items[i].date }}</td>
    <td>{{ items[i].subject }}</td>
    <td>{{ items[i].grade_out_of }}</td>
    <td>{{ items[i].class_average }}</td>
    <td>{{ items[i].max }}</td>
    <td>{{ items[i].min }}</td>
    <td>{{ items[i].coefficient }}</td>
   </tr>
  {% endfor %}
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.em;
        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: center;
          border-bottom: 0px solid #1c2020;
      }
      tr {
          border-bottom: 0px solid #1c2020;
          line-height: 25px;
      }
      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) > td:nth-child(2) {
        text-align: left;
      }


Tu aura le même résultat que les autres cartes

1 « J'aime »

Top! Merci bcp ça fonctionne nickel