diff --git a/example_markdown.yaml b/example_markdown.yaml
index 5e48b82..da5fc8e 100644
--- a/example_markdown.yaml
+++ b/example_markdown.yaml
@@ -400,3 +400,115 @@
tr:nth-child(n+2) > td:nth-child(2) {
text-align: left;
}
+ - type: markdown
+ content: |
+
Punishments
+
+ {% set dates = state_attr('sensor.pronote_parent_fanny_punishment','date')%}
+
+ Date |
+ ReasonCourse |
+ Punishment |
+ Duration |
+
+ {% for i in range(0, dates | count, 1) %}
+
+ {% if state_attr('sensor.pronote_parent_fanny_punishment','exclusion')[i] == '1' %}
+
+
+ {{ dates[i]}} |
+ {% else %}
+ {{dates[i]}} |
+ {% endif %}
+ {{ state_attr('sensor.pronote_parent_fanny_punishment','reasons')[i] }} |
+ {{ state_attr('sensor.pronote_parent_fanny_punishment','nature')[i] }} |
+ {{ state_attr('sensor.pronote_parent_fanny_punishment','duration')[i] }} |
+
+ {% endfor %}
+ card_mod:
+ style:
+ .: |
+ ha-card ha-markdown {
+ 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: green;
+ color: #222627;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ span {
+ background: red;
+ color: #222627;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ p {
+ background: lightgreen;
+ color: #222627;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ strong {
+ background: red;
+ color: #222627;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ em {
+ background: yellow;
+ color: #222627;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ u {
+ background: lightblue;
+ color: #222627;
+ border-radius: 5px;
+ padding: 5px;
+ }
+ span {
+ padding: 5px;
+ }
+ tr:nth-child(n+2) > td:nth-child(2) {
+ text-align: left;
+ }