Ca doit être du côté du fichier pronote.jinja que l’erreur vient je pense (surtout la partie styles)
Si ça peut t’aider, mon fichier pronote.jinja
{%- macro averages_markdown(firstname, sensor_id) -%}
{% set items = state_attr(sensor_id,'averages') %}
<div>{{ firstname }} - Moyennes</div>
<table>
{%- for item in items -%}
<tr>
<td><span></span></td>
<td ><b>{{ item.subject}}</b></td>
<td width="50%">
<b>{{ item.average }} </b>
<ul>
<li>Moy. cl.: {{ item.class}}</li>
<li>Min / max : {{ item.min }} / {{ item.max }}</li>
</ul>
</td>
<td><span></span></td>
</tr>
{% endfor %}
</table>
{% endmacro %}
{%- macro absences_markdown(firstname, sensor_id) -%}
{% set items = state_attr(sensor_id,'absences') %}
<div>{{ firstname }} - Absences</div>
<table>
{%- for item in items -%}
<tr>
<td width="50%">
Le {{as_timestamp(item.from) | int | timestamp_custom('%d %b à %Hh%M', true)}}
<br>{{item.hours}} de cours manqué(s)</td>
<td>
{%- if item.reason == '' -%}
Motif : inconnu<br/>
{%- else -%}
Motif : {{item.reason}}<br/>
{% endif %}
{%- if item.justified == false -%}
<span>Absence non justifiée</span>
{%- else -%}
<mark>Absence justifiée</mark>
{% endif %}</td>
</tr>
{% endfor %}
</table>
{% endmacro %}
{%- macro homework_markdown(firstname, sensor_id) -%}
{% set days = ["Lun.", "Mar.", "Mer.", "Jeu.", "Ven.", "Sam.", "Dim."] %}
{% set items = state_attr(sensor_id,'homework') %}
<div>{{ firstname }} - Devoirs</div>
<table>
{%- for item in items -%}
<tr>
<td>{{ days[item.date.strftime('%w')| int - 1] }} {{as_timestamp(item.date) | int | timestamp_custom('%d/%m', true)}}</td>
<td><span></span></td>
<td><b>{{ item.subject}}</b><br>{{ item.short_description }}</td>
<td>{%- if item.done -%}<mark>fait</mark>{%- else -%}<span>non fait</span>{%- endif -%}</td>
</tr>
{% endfor %}
</table>
{% endmacro %}
{%- macro grades_markdown(firstname, sensor_id) -%}
{% set items = state_attr(sensor_id,'grades') %}
<div>{{ firstname }} - Notes</div>
<table>
{%- for item in items -%}
<tr>
<td width="20%">{{as_timestamp(item.date) | int | timestamp_custom('%d/%m', true)}}</td>
<td><span></span></td>
<td><b>{{ item.subject}}</b><br>{{ item.comment }}</td>
<td width="30%"><b>{{ item.grade_out_of }} </b>
{%- if item.coefficient != '1' -%} <i>(Coeff. : {{ item.coefficient }})</i>{% endif %}
<ul>
<li>Moy. cl.: {{ item.class_average }}</li>
<li>Min-max : {{ item.min }}-{{ item.max }}</li>
</ul>
</td>
</tr>
{% endfor %}
</table>
{% endmacro %}
{%- macro timetable_markdown(firstname, sensor_id) -%}
{%- if as_timestamp(now())|int <= as_timestamp((state_attr(sensor_id, 'lessons')|last).end_at)|int + (3*3600) -%}
{% set days = ["Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"] %}
{% set items = state_attr(sensor_id,'lessons') %}
<div>
{{ firstname }} - {{ days[items[0].start_at.strftime('%w')| int - 1] }} {{as_timestamp(items[0].start_at) | int | timestamp_custom('%d/%m', true)}}
- Début à {{ as_timestamp(state_attr(sensor_id,'day_start_at'))| int | timestamp_custom('%-Hh%M', true) }}
</div>
<table>
{%- for item in items -%}
{%- set canceled = item.canceled == True -%}
<tr>
<td>
{{ item.start_time }}<br />
{{ item.end_time }}
</td>
<td>
<span></span>
</td>
<td>
{%- if canceled -%}<del>{%- endif -%}
<b>{{ item.lesson }}</b>
{%- if canceled -%}</del>{%- endif -%}
<br />
Salle {{ item.classroom }}
</td>
<td>
{%- if canceled -%}
<mark>{{ item.status }}</mark>
{%- elif item.status != None -%}
<span>{{ item.status }}</span>
{%- endif -%}
</td>
</tr>
{%- endfor -%}
</table>
{%- endif -%}
{% endmacro %}
{%- macro pronote_styles(sensor_id) -%}
div {
background-color:rgb(50, 50, 50);
padding: 12px;
color:white;
font-weight:normal;
font-size:1em;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
}
table{
font-size: 0.9em;
font-family: Roboto;
width: 100%;
outline: 0px solid #393c3d;
margin-top:5px;
border-collapse: collapse;
}
td {
vertical-align: middle;
}
tr td:last-child span {
background-color: #EC4B34;
padding: 4px;
border-radius: 4px;
white-space: nowrap;
}
mark {
background-color: #009767;
padding: 4px;
border-radius: 4px;
white-space: nowrap;
margin-top:3px
}
@media (prefers-color-scheme: dark) {
tr:nth-child(even) {background-color: var(--divider-color);}
}
@media (prefers-color-scheme: light) {
tr:nth-child(odd) {background-color: #e9e9e9;}
}
tr td:nth-child(2) {
width: 4px;
padding: 5px 0;
}
{%- if sensor_id == "sensor.pronote_XXX_XXX_timetable_next_day" -%}
tr td:nth-child(2) > span {
display:inline-block;
width: 4px;
height: 3rem;
border-radius:4px;
}
tr td:first-child {
width: 13%;
text-align:right;
}
{%- set items = state_attr(sensor_id, 'lessons') -%}
{%- for i in range(0, items | count, 1) -%}
{%- if items[i].canceled and not loop.last and items[i].start_at == items[i+1].start_at -%}
tr:nth-child({{ loop.index }}) {
display:none;
}
{%- else -%}
tr:nth-child({{ loop.index }}) td:nth-child(2) > span {
background-color: {{items[i].background_color}};
}
{% if as_timestamp(now()) > as_timestamp(items[i].end_at) %}
tr:nth-child({{ loop.index }}) {
opacity: 0.3;
}
{% endif %}
{%- endif -%}
{%- endfor -%}
{% endif %}
{%- if sensor_id == "sensor.pronote_XXX_XXX_homework" -%}
tr td:nth-child(2) > span {
display:inline-block;
width: 4px;
height: 3rem;
border-radius:4px;
}
tr td:first-child {
width: 13%;
text-align:center;
white-space: nowrap;
}
{%- set items = state_attr(sensor_id, 'homework') -%}
{%- for i in range(0, items | count, 1) -%}
tr:nth-child({{ loop.index }}) td:nth-child(2) > span {
background-color: {{items[i].background_color}};
}
{%- endfor -%}
{% endif %}
{%- if sensor_id == "sensor.pronote_XXX_XXX_grades" -%}
tr td:nth-child(2) > span {
display:inline-block;
width: 4px;
height: 3rem;
border-radius:4px;
}
tr td:first-child {
width: 15%;
text-align:center;
white-space: nowrap;
}
tr td:last-child {
width: 30%;
white-space: nowrap;
}
{%- set items = state_attr(sensor_id, 'grades') -%}
{%- for i in range(0, items | count, 1) -%}
{%- if items[i].grade >= items[i].class_average -%}
tr:nth-child({{ loop.index }}) td:nth-child(2) > span {
background-color: #009767;
}
{%- else -%}
tr:nth-child({{ loop.index }}) td:nth-child(2) > span {
background-color: #EC4B34;
}
{%- endif -%}
{%- endfor -%}
{% endif %}
ul{
padding: 0px 0px 0px 0px;
margin: 0px;
list-style-type:none;
}
li{
padding: 0px 0px 0px 0px;
font-style: italic;
color: grey;
}
tr.canceled td {
color: orange;
}
td {
padding: 5px 10px 5px 10px;
text-align: left;
vertical-align: top;
}
{%- if sensor_id == "sensor.pronote_XXX_XXX_averages" -%}
tr td:last-child > span {
display: inline-block;
width: 4px;
max-width: 4px;
height: 3rem;
border-radius: 4px;
}
tr td:nth-child(1) > span {
display:inline-block;
width: 4px;
height: 3rem;
border-radius:4px;
}
{%- set items = state_attr(sensor_id, 'averages') -%}
{%- for i in range(0, items | count, 1) -%}
tr:nth-child({{ loop.index }}) td:nth-child(1) > span {
background-color: {{items[i].background_color}};
}
{%- if items[i].average >= items[i].class -%}
tr:nth-child({{ loop.index }}) td:last-child > span{
background-color: #009767;
padding: 0px;
}
{%- else -%}
tr:nth-child({{ loop.index }}) td:last-child > span {
background-color: #EC4B34;
padding: 0px;
}
tr:nth-child({{ loop.index }}) td:last-child {
color: #EC4B34;
}
tr:nth-child({{ loop.index }}) td:last-child > ul {
color: var(--primary-text-color);
}
{%- endif -%}
{%- endfor -%}
{% endif %}
{%- endmacro -%}