# \[Mon Dashboard\] - @felix62

**URL:** <https://forum.hacf.fr/t/mon-dashboard-felix62/5154>\
**Category:** Présentations\
**Tags:** tableau-de-bord-dashboard\
**Created:** [Juin 21, 2021, 3:27 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154 "2021-06-21T15:27:57Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Juin 21, 2021, 3:27 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/1 "2021-06-21T15:27:57Z")

</div>

![domotique-definition-2](https://forum.hacf.fr/uploads/default/original/3X/0/e/0e38923129d7c9701d4ef3d1b67288516a745550.jpeg)

**Liens vers le github** : [Lien](https://github.com/Felixlechatt/Home-assistant)

Ma configuration et entiérement décomposée (fragmentée) ([+infos sur ce lien](https://forum.hacf.fr/t/repartir-le-fichier-configuration-yaml-en-plusieurs-fichiers/2480) merci a @Tank )

**Fonctionnalités :**

- 💡 Gestion des lumières et scénario (detecteur de mouvement…)
- ⛅ Gestion infos générales: Saisons, levé /couché du soleil (angle, zenith…), éphemeride @papoo merci, astrologie, jours fériés, culture générale (sa ne fait pas de mal)+CAC40
- 🍽 Gestion planning repas de la semaine
- 📺 Gestion du poste de télévision (Remote, ambilight, DLNA ect…)
- 🪟 Gestion des volets roulants 4 Mode ([Lien pour +Info](https://forum.hacf.fr/t/automatiser-ses-volets-roulants-en-fonction-du-soleil-ete-hiver/1061/42)) merci à @Yul pour le topic
- 🔋 Gestion des batterie : super sujet ([Lien pour + Info](https://forum.hacf.fr/t/carte-automatique-pour-suivi-des-batteries)) merci @Pulpy-Luke
- ⛽ Stations service: Essence/Diesel (voir lien: [Récupérer les prix de carburants - #195 par Pbranly](https://forum.hacf.fr/t/recuperer-les-prix-de-carburants/644/195))
- ⚡ Mesure de la consommation (électrique)
- 🪟 Pilotage des volets
- 📬 Capteur boîtes à lettre

**Automatisations:**

- 💾 Purge de la BDD automatique
- 🔌 Prise Lexman zigbee (toute appareil mobile connecté arrivant a 90% la prise s’éteint)
- 🔌 Reboot auto de la prise du FAI si ping google ect… sans réponse. merci à @FillR2
- 🪟 Gestion des volets 4 Mode (Normal, Auto froid, Auto chauf, Manuel)
- Notification Automatiques:
  - 🌡 Rafraichissement Nocturne / Matinal : Notification durant l’été quand il est conseillé d’ouvrir ou fermé les fenêtre 🙂
  - ☀ Alerte Météo
  - 🎂 Anniversaire
  - ♻ Poubelle
  - 🏃‍♂️ 📸 Détection de mouvement avec photo
  - ⚡Onduleur (si coupure de courant ou reprise)
  - 🎉Fête du jour (éphéméride)
  - 🌧 Alerte pluie attendu dans l’heure et inversement
  - 🤖 Mise a jour dispo de HA ou HACS.

**Bien d’autres fonction doivent arrivée:**

**Sujet / tuto rédiger:**

📑 Donner un titre à vos carte (Text divider): [Lien](https://forum.hacf.fr/t/carte-text-divider-row-titre-pour-vos-carte/4921)  
📑 Reduiser ses lignes de codes (décluttering-card) : [Lien](https://forum.hacf.fr/t/carte-decluttering-card-reduiser-vos-lignes-de-code-lovelace/4580)  
📸 Notification avec photo lors d’une détéction de mouvement : [Lien](https://forum.hacf.fr/t/notification-avec-photo-quand-detection-de-mouvement/5068)

**Bonne Visite**

 ![dashboard accueil](https://forum.hacf.fr/uploads/default/original/3X/d/c/dcec9be5ffd4f878e2bfe9529fdc3889fec0a2ca.jpeg)  
 ![HAdashboard](https://forum.hacf.fr/uploads/default/original/3X/9/c/9c0a3406ff06bd8210f3835043e64ebeee3cd57d.gif)

![sommaire](https://forum.hacf.fr/uploads/default/original/2X/b/bf87c495fadbe2f64cfb7c67bac0adf90a2d2330.gif)

**Badge d’utilisateur:**

 ![badge personne](https://forum.hacf.fr/uploads/default/original/2X/1/1fa9228f21f9d042927bb70792071ca053a92808.jpeg)

Automatisation merci à @papoo ([lien du github](https://github.com/papo-o/home-assistant-config/blob/master/integrations/alerte_rafraichissement_nocturne.yaml)) pour le rafraichissement nocturne ou j’ai combiné en 1 seul automatisation pour Nocturne et matinal la voici:

> **Input\_datetime**
>
> ```auto
> ############################################################
> ## SENSOR ##
> ############################################################
> #sensor:
> # - platform: min_max # https://www.home-assistant.io/integrations/min_max/
> # name: "Température moyenne étage"
> # type: mean
> # entity_ids:
> # - sensor.temperature_chambre_1
> # - sensor.temperature_chambre_2
> # - sensor.temperature_chambre_parents
> # - sensor.temperature_douche
> #
> #
> # - platform: min_max # https://www.home-assistant.io/integrations/min_max/
> # name: "Température moyenne extérieure"
> # type: mean
> # entity_ids:
> # - sensor.temperature_anemometre
> # - sensor.temperature_exterieure_allee
> # - sensor.temperature_exterieure_terrasse
> 
> ##############################################################################################################
> ### INPUT_DATETIME #####################################################################################
> ##############################################################################################################
> input_datetime: 
> # https://www.home-assistant.io/integrations/input_datetime/
> ##################################################################################
> night_cooling_last_notification_sent:
> has_date: true
> morning_cooling_last_notification_sent:
> has_date: true
> 
> ```

> **Automatisation**
>
> ```auto
> - id: Rafraîchissement Nocturne Matinal
> alias: Rafraichissement Nocturne Matinal
> trigger:
> - platform: time_pattern
> minutes: /5
> seconds: 0
> condition:
> - condition: and
> conditions:
> - condition: template
> value_template: '{{ now().month > 4 }}'
> - condition: template
> value_template: '{{ now().month < 10 }}'
> action:
> - choose:
> - conditions:
> - condition: template
> value_template: "{{\n not is_state_attr('input_datetime.morning_cooling_last_notification_sent',
> 'day', now().day) \n}}"
> - condition: template
> value_template: '{{ states.sensor.temperature.state | float(0) <= (states.sensor.xxxx_temperature.state
> | float(0) + 1) }}'
> - condition: template
> value_template: '{{ now().hour < 14 }}'
> - condition: template
> value_template: "{{\n not is_state_attr('input_datetime.morning_cooling_last_notification_sent',
> 'day', now().day) \n}}\n"
> sequence:
> - service: notify.notify
> data_template:
> message: "la Température intérieure {{ states.sensor.temperature.state | round
> | int(0) }} °C\U0001F321️ est inférieur/égal à la température extérieure {{
> states.sensor.xxx_temperature.state | round | int(0) }} °C\U0001F321️.
> Fermeture des fenêtres recommandée \U0001FA9F"
> - service: input_datetime.set_datetime
> entity_id: input_datetime.morning_cooling_last_notification_sent
> data_template:
> date: '{{ now().strftime(''%Y-%m-%d'') }}'
> - conditions:
> - condition: template
> value_template: '{{ (states.sensor.xxxx_temperature.state | float(0) ) >
> 21 }}'
> - condition: template
> value_template: '{{ states.sensor.temperature.state | float(0) > (states.sensor.xxx_temperature.state
> | float(0) + 1) }}'
> - condition: template
> value_template: '{{ now().hour > 18 }}'
> - condition: template
> value_template: "{{\n not is_state_attr('input_datetime.night_cooling_last_notification_sent',
> 'day', now().day) \n}}\n"   
> sequence: 
> - service: notify.notify
> data_template:
> message: "la Température intérieure {{ states.sensor.temperature.state | round
> | int(0) }} °C\U0001F321️ est superieure à la température extérieure {{ states.sensor.xxxx_temperature.state
> | round | int(0) }} °C\U0001F321️. Ouverture des fenêtres recommandée \U0001FA9F"
> - service: input_datetime.set_datetime
> entity_id: input_datetime.night_cooling_last_notification_sent
> data_template:
> date: '{{ now().strftime(''%Y-%m-%d'') }}'     
> default: []
> 
> ```

**Page Meteo:**

 ![meteo](https://forum.hacf.fr/uploads/default/original/3X/b/a/ba7abf2b054b6b608ee9ebdd48d6ef977d53d2ba.jpeg)

**Page Informatique:**

- regroupant : (Synology, Onduleur, Pi-hole, Reseau)

 ![informatique](https://forum.hacf.fr/uploads/default/original/3X/7/9/7933f4d9f7ddf4726fb431d9b7f591680f8ab9ae.jpeg)

**Energie:**

 ![energie1](https://forum.hacf.fr/uploads/default/original/3X/a/a/aa997dfe56f0cbf475cbd2994edb1ac04a479c95.jpeg)  
 ![energie2](https://forum.hacf.fr/uploads/default/original/3X/3/6/36ffd7b8660bf359782773fcf9be86ff413eb890.jpeg)

Energie obtenue avec le module supplémentaire: Zlinky  
 ![zigate-usb-ttl](https://forum.hacf.fr/uploads/default/original/3X/1/8/183081b281e6b0ab0a1271baba0a9f05e42bab6f.jpeg)  
Voir le tuto : [Comment optimiser et gerer l’énérgie avec production solaire](https://forum.hacf.fr/t/tuto-optimiser-la-gestion-de-sa-production-solaire/22834)

---

<div class="post-metadata">

**Author:** ![Lolobuc54](https://forum.hacf.fr/user_avatar/forum.hacf.fr/lolobuc54/32/29274_2.png) [@Lolobuc54](https://forum.hacf.fr/u/Lolobuc54)\
**Post date:** [Juin 21, 2021, 5:13 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/2 "2021-06-21T17:13:24Z")

</div>

Merci pour ton partage, ça donne des idées.  
J’aime bien ton écran d’acceuil (surtout la blague du jour 😂)  
Mais ta carte pour le Syno est vraiment sympa 🙂, alors si cela ne te dérange pas partager le code , je suis preneur 😁

---

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Juin 21, 2021, 6:05 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/3 "2021-06-21T18:05:40Z")

</div>

config.yaml

```auto
sun:
zodiac:
python_script:

```

Sensor date du jour complete:

```auto
- platform: template
  sensors:
    date_fr_complete:
      value_template: "{{states.sensor.jour_fr.state }} {% set months = ['Janvier', 'Février', 'Mars', 'Avril', 'Mai', 'Juin', 'Juillet', 'Août', 'Septembre', 'Octobre', 'Novembre', 'Décembre'] %} {{ now().day | string + ' ' + months[now().month-1]}} {{now().year }}"
      friendly_name: "Date"
      icon_template: mdi:calendar

```

Saison: (vivaldi :p)

```auto
  - platform: season

```

Rest Json fete du jour:

```auto
- platform: rest
  resource: https://fetedujour.fr/api/v2/7vCo4ALjRbwP35cv/json
  name: Fete du jour
  value_template: "{{ value_json.name }}"

```

Ou en python:

```auto
""" https://pon.fr/home-assistant-infos-du-jour-et-du-lendemain/ """
""" https://github.com/papo-o/home-assistant-config/blob/master/python_scripts/jours_feries.py """

""" This script creates sensors that will display the saints of the day """
""" and the day after, of the possible holidays and birthdays """
""" of the day and the day after. For the birdays it """
""" will return years as an attribute """

""" Requires python_script: to be enabled in you configuration """

""" Usage: """
""" """
""" automation: """
""" alias: Refresh jours feries sensors """
""" trigger: """
""" platform: time """
""" at: '00:00:01' """
""" action: """
""" service: python_script.jours_feries """
""" data: """
""" name: "jours_feries" """

""" This will create 6 sensors. two for saints, two for publics hollidays, """
""" mother and father days, grandmother and grandfather days and two """
""" for birthday. One for today and the other for tomorrow """
""" the attribute 'age' will show the number of years """

""" example to display sensors with the auto-entities card """

""" - type: custom:auto-entities """
""" card: """
""" type: entities """
""" title: "Infos du jour" """
""" show_header_toggle: false """
""" filter: """
""" include: """
""" - entity_id: /saint/ """
""" - entity_id: /_ferie/ """
""" - entity_id: /_anniversaire/ """
""" exclude: """
""" - state: "unavailable" """

today = datetime.datetime.now().date()
aujourdhui = today.day
demain = int(aujourdhui) + 1
mois = today.month
annee = today.year
day = '{:02d}'.format(today.day)
tomorrow = '{:02d}'.format((today + datetime.timedelta(days=1)).day)
month = '{:02d}'.format(today.month)
feteaujourdhui = day+":"+month
fetedemain = tomorrow+":"+month

def listeanniversaires(an):
    """Liste des anniversaires"""
    F = [] # =liste des dates des anniversaires en date-liste d=[j,m,a]
    L = [] # =liste des libelles des anniversaires

    d = [20,6,1988] 
    F.append(d)
    L.append(u"de roseline bachelot")
    
    d = [2,8,1991] 
    F.append(d)
    L.append(u"de cop")

    d = [21,7,2017] 
    F.append(d)
    L.append(u"")
    
    return F, L

def estanniversaire(d):
    """estferie(d): => dit si une date d=[j,m,a] donnée est un anniversaire
       si la date est un anniversaire, renvoie son libellé
       sinon, renvoie "unavailable" afin de masquer le sensor"""
    j,m,a = d
    F,L = listeanniversaires(a)
    for i in range(0, len(F)):
        if j==F[i][0] and m==F[i][1]:
            a=F[i][2]
            years = annee - int(a)
            return L[i], years
    return "unavailable" , ""

annivjour, agejour = estanniversaire([aujourdhui,mois,annee])
annivdemain, agedemain = estanniversaire([demain,mois,annee])

"""The syntax is hass.states.set(entitiy_id, state, {dict of attributes}) """
hass.states.set("sensor.jour_anniversaire" , annivjour ,
  {
    "icon" : "mdi:calendar-star" ,
    "friendly_name" : "Aujourd'hui c'est l'anniversaire ",
    "années" : agejour
  }
)

hass.states.set("sensor.demain_anniversaire" , annivdemain ,
  {
    "icon" : "mdi:calendar-star" ,
    "friendly_name" : "Demain c'est l'anniversaire ",
    "années" : agedemain
  }
)

""" Calcul des jours fériés """

def datepaques(an):
    """Calcule la date de Pâques d'une année donnée an (=nombre entier)"""
    a=an//100
    b=an%100
    c=(3*(a+25))//4
    d=(3*(a+25))%4
    e=(8*(a+11))//25
    f=(5*a+b)%19
    g=(19*f+c-e)%30
    h=(f+11*g)//319
    j=(60*(5-d)+b)//4
    k=(60*(5-d)+b)%4
    m=(2*j-k-g+h)%7
    n=(g-h+m+114)//31
    p=(g-h+m+114)%31
    jour=p+1
    mois=n
    return [jour, mois, an]

""" la fête des grands-mères est fixée au premier dimanche de mars"""
""" calcul du jour de la fête de mères"""
""" la fête des mères est fixée au dernier dimanche de mai sauf si cette date coïncide avec celle de la Pentecôte"""
""" auquel cas elle a lieu le premier dimanche de juin."""
""" la fête des pères est fixée au 3e dimanche de juin."""
""" Pentecôte = Pâques + 49 jours """
""" la fête des grands-pères est fixée au premier dimanche d'octobre"""

def bissextile(annee):
    if (annee % 4) == 0:
        if (annee % 100) == 0:
            if (annee % 400) == 0:
                joursFevrier = 29
            else:
                joursFevrier = 28
        else:
            joursFevrier = 29
    else:
        joursFevrier = 28
    return joursFevrier

def listejoursferies(an):
    """Liste des jours fériés France en date-liste de l'année an (nb entier)."""
    F = [] # =liste des dates des jours feries en date-liste d=[j,m,a]
    L = [] # =liste des libelles du jour ferie
    dp = datepaques(an)
    jdp,mdp,adp = dp

    # Jour de l'an
    d = [1,1,an]
    F.append(d)
    L.append(u"Jour de l'an")

    # # Jour de test
    # d = [3,5,an]
    # F.append(d)
    # L.append(u"Jour de papoo")

    # # Jour de test
    # d = [4,5,an]
    # F.append(d)
    # L.append(u"Jour de papoo1")

    # premier dimanche de mars
    derJourFev = datetime.date(an, 2, bissextile(an)).isocalendar()[2]
    if derJourFev>6:
        derJourFev=0
    #premDimMar = [7-derJourFev,3,an]
    d = [7-derJourFev,3,annee]
    F.append(d)
    L.append(u"Fête des grands-mères")
    
    # Dimanche de Paques
    d = dp
    F.append(d)
    L.append(u"Dimanche de Pâques")

    # Lundi de Paques
    d = [jdp+1,mdp,adp]
    F.append(d)
    L.append(u"Lundi de Pâques")

    # Fête du travail
    d = [1,5,an]
    F.append(d)
    L.append(u"Fête du travail")

    # Victoire des allies 1945
    d = [8,5,an]
    F.append(d)
    L.append(u"Victoire des alliés 1945")

    # Jeudi de l'Ascension
    d = [jdp+9,mdp+1,adp]
    F.append(d)
    L.append(u"Jeudi de l'Ascension")

    # Dimanche de Pentecote
    d = [jdp+19,mdp+1,adp]
    F.append(d)
    L.append(u"Pentecôte")

    # Lundi de Pentecote
    d = [jdp+20,mdp+1,adp]
    F.append(d)
    L.append(u"Lundi de Pentecôte")

    # Fete des mères
    derJourMai = datetime.date(an, 5, 31).isocalendar()[2]
    if derJourMai>6:
        derJourMai=0
    derDimMai = [31-derJourMai,5,an]
    premDimJuin = [7-derJourMai,6,an]
    if derDimMai == [jdp+19,mdp+1,adp]:
        d = premDimJuin
    else:
        d = derDimMai
    F.append(d)
    L.append(u"Fête des mères")

    # Fete des pères
    d = [21-derJourMai,6,an]
    F.append(d)
    L.append(u"Fête des pères")

    # Fete Nationale
    d = [14,7,an]
    F.append(d)
    L.append(u"Fête Nationale")

    # Assomption
    d = [15,8,an]
    F.append(d)
    L.append(u"Assomption")

    # premier dimanche d'octobre
    derJourSep = datetime.date(an, 9, 30).isocalendar()[2]
    if derJourSep>6:
        derJourSep=0
    #premDimOct = [7-derJourSep,3,an]
    d = [7-derJourSep,10,an]
    F.append(d)
    L.append(u"Fête des grands-pères")

    # Toussaint
    d = [1,11,an]
    F.append(d)
    L.append(u"Toussaint")

    # Armistice 1918
    d = [11,11,an]
    F.append(d)
    L.append(u"Armistice 1918")

    # Jour de Noel
    d = [25,12,an]
    F.append(d)
    L.append(u"Jour de Noël")

    return F, L

def estferie(d):
    """estferie(d): => dit si une date d=[j,m,a] donnée est fériée France
       si la date est fériée, renvoie son libellé
       sinon, renvoie "unavailable" afin de masquer le sensor"""
    j,m,a = d
    F,L = listejoursferies(a)
    for i in range(0, len(F)):
        if j==F[i][0] and m==F[i][1] and a==F[i][2]:
            return L[i]
    return "unavailable" 

"""The syntax is hass.states.set(entitiy_id, state, {dict of attributes}) """
hass.states.set("sensor.jour_ferie" , estferie([aujourdhui,mois,annee]) ,
  {
    "icon" : "mdi:creation" ,
    "friendly_name" : "Férié aujourd'hui"
  }
)

hass.states.set("sensor.demain_ferie" , estferie([demain,mois,annee]),
  {
    "icon" : "mdi:creation" ,
    "friendly_name" : "Férié demain"
  }
)

""" Fête du jour et du lendemain, ne pas supprimer de date """
fetes = {
    "01:01" : "Ugolin",
    "02:01" : "Basile",
    "03:01" : "Geneviève",
    "04:01" : "Odilon",
    "05:01" : "Édouard",
    "06:01" : "André",
    "07:01" : "Raymond",
    "08:01" : "Lucien",
    "09:01" : "Alix de Ch",
    "10:01" : "Guillaume",
    "11:01" : "Paulin d Aquilee",
    "12:01" : "Tatiana",
    "13:01" : "Yvette",
    "14:01" : "Nina",
    "15:01" : "Rémi",
    "16:01" : "Marcel",
    "17:01" : "Roseline",
    "18:01" : "Prisca",
    "19:01" : "Marius",
    "20:01" : "Sébastien",
    "21:01" : "Agnès",
    "22:01" : "Vincent",
    "23:01" : "Barnard",
    "24:01" : "François",
    "25:01" : "onversion de Paul",
    "26:01" : "Paule",
    "27:01" : "Angèle",
    "28:01" : "Thomas",
    "29:01" : "Gildas",
    "30:01" : "Martine",
    "31:01" : "Marcelle",
    "01:02" : "Ella",
    "02:02" : "Theophane",
    "03:02" : "Blaise",
    "04:02" : "Véronique",
    "05:02" : "Agathe",
    "06:02" : "Gaston",
    "07:02" : "Eugénie",
    "08:02" : "Jacqueline",
    "09:02" : "Apolline",
    "10:02" : "Arnaud",
    "11:02" : "Severin",
    "12:02" : "Felix",
    "13:02" : "Beatrice",
    "14:02" : "Valentin",
    "15:02" : "Claude",
    "16:02" : "Julienne",
    "17:02" : "Alexis",
    "18:02" : "Bernadette",
    "19:02" : "Gabin",
    "20:02" : "Aimee",
    "21:02" : "Damien",
    "22:02" : "Isabelle",
    "23:02" : "Lazare",
    "24:02" : "Modeste",
    "25:02" : "Romeo",
    "26:02" : "Nestor",
    "27:02" : "Honorine",
    "28:02" : "Romain",
    "29:02" : "Augula",
    "01:03" : "Aubin",
    "02:03" : "Charles",
    "03:03" : "Gwenole",
    "04:03" : "Casimir",
    "05:03" : "Olive",
    "06:03" : "Colette",
    "07:03" : "Félicité",
    "08:03" : "Jean",
    "09:03" : "Françoise",
    "10:03" : "Vivien",
    "11:03" : "Rosine",
    "12:03" : "Justine",
    "13:03" : "Rodrigue",
    "14:03" : "Maud",
    "15:03" : "Louise",
    "16:03" : "Benedicte",
    "17:03" : "Patrick",
    "18:03" : "Cyrille",
    "19:03" : "Joseph",
    "20:03" : "Herbert",
    "21:03" : "Clemence",
    "22:03" : "Lea",
    "23:03" : "Victorien",
    "24:03" : "Catherine",
    "25:03" : "Humbert",
    "26:03" : "Larissa",
    "27:03" : "Habib",
    "28:03" : "Gontran",
    "29:03" : "Gwladys",
    "30:03" : "Amedee",
    "31:03" : "Benjamin",
    "01:04" : "Hugues",
    "02:04" : "Sandrine",
    "03:04" : "Richard",
    "04:04" : "Isidore",
    "05:04" : "Irene",
    "06:04" : "Marcellin",
    "07:04" : "Jean-Baptiste",
    "08:04" : "Julie",
    "09:04" : "Gautier",
    "10:04" : "Fulbert",
    "11:04" : "Stanislas",
    "12:04" : "Jules 1er",
    "13:04" : "Ida",
    "14:04" : "Maxime",
    "15:04" : "Paterne",
    "16:04" : "Benoît",
    "17:04" : "Étienne",
    "18:04" : "Parfait",
    "19:04" : "Emma",
    "20:04" : "Odette",
    "21:04" : "Anselme",
    "22:04" : "Alexandre",
    "23:04" : "Georges",
    "24:04" : "Fidèle",
    "25:04" : "Marc",
    "26:04" : "Alida",
    "27:04" : "Zita",
    "28:04" : "Valérie",
    "29:04" : "Catherine",
    "30:04" : "Robert",
    "01:05" : "Joseph",
    "02:05" : "Boris",
    "03:05" : "Philippe",
    "04:05" : "Sylvain",
    "05:05" : "Judith",
    "06:05" : "Prudence",
    "07:05" : "Gisèle",
    "08:05" : "Desire",
    "09:05" : "Pacôme",
    "10:05" : "Solange",
    "11:05" : "Estelle",
    "12:05" : "Achille",
    "13:05" : "Rolande",
    "14:05" : "Matthias",
    "15:05" : "Denise",
    "16:05" : "Honore",
    "17:05" : "Pascal",
    "18:05" : "Éric",
    "19:05" : "Yves",
    "20:05" : "Bernardin",
    "21:05" : "Constantin",
    "22:05" : "Émile",
    "23:05" : "Didier",
    "24:05" : "Donatien",
    "25:05" : "Sophie",
    "26:05" : "Bérenger",
    "27:05" : "Augula",
    "28:05" : "Germain",
    "29:05" : "Aymard",
    "30:05" : "Ferdinand",
    "31:05" : "Perrine",
    "01:06" : "Justin",
    "02:06" : "Blandine",
    "03:06" : "Charles",
    "04:06" : "Clotilde",
    "05:06" : "Igor",
    "06:06" : "Norbert",
    "07:06" : "Gilbert",
    "08:06" : "Médard",
    "09:06" : "Diane",
    "10:06" : "Landry",
    "11:06" : "Barnabé",
    "12:06" : "Guy",
    "13:06" : "Antoine",
    "14:06" : "Élisée",
    "15:06" : "Germaine",
    "16:06" : "Jean-François",
    "17:06" : "Hervé",
    "18:06" : "Leonce",
    "19:06" : "Romuald",
    "20:06" : "Silvère",
    "21:06" : "Rodolphe",
    "22:06" : "Alban",
    "23:06" : "Audrey",
    "24:06" : "Jean-Baptiste",
    "25:06" : "Prosper",
    "26:06" : "Anthelme",
    "27:06" : "Fernand",
    "28:06" : "Irénée",
    "29:06" : "Pierre et Paul",
    "30:06" : "Martial",
    "01:07" : "Thierry",
    "02:07" : "Martinien",
    "03:07" : "Thomas",
    "04:07" : "Florent",
    "05:07" : "Antoine",
    "06:07" : "Mariette",
    "07:07" : "Raoul",
    "08:07" : "Thibaud",
    "09:07" : "Amandine",
    "10:07" : "Ulric",
    "11:07" : "Benoit",
    "12:07" : "Olivier",
    "13:07" : "Joëlle",
    "14:07" : "Camille",
    "15:07" : "Donald",
    "16:07" : "Elvire",
    "17:07" : "Charlotte",
    "18:07" : "Frédéric",
    "19:07" : "Arsène",
    "20:07" : "Marina",
    "21:07" : "Victor",
    "22:07" : "Marie-Madeleine",
    "23:07" : "Brigitte",
    "24:07" : "Christine",
    "25:07" : "Jacques",
    "26:07" : "Anne",
    "27:07" : "Nathalie",
    "28:07" : "Samson",
    "29:07" : "Marthe",
    "30:07" : "Juliette",
    "31:07" : "Ignace",
    "01:08" : "Alphonse",
    "02:08" : "Julien",
    "03:08" : "Lydie",
    "04:08" : "Jean-Marie",
    "05:08" : "Abel",
    "06:08" : "Octavien",
    "07:08" : "Gaetan",
    "08:08" : "Dominique",
    "09:08" : "Amour",
    "10:08" : "Laurent",
    "11:08" : "Claire",
    "12:08" : "Clarisse",
    "13:08" : "Hippolyte",
    "14:08" : "Evrard",
    "15:08" : "Marie",
    "16:08" : "Armel",
    "17:08" : "Hyacinthe",
    "18:08" : "Hélène",
    "19:08" : "Eudes",
    "20:08" : "Bernard",
    "21:08" : "Christophe",
    "22:08" : "Fabrice",
    "23:08" : "Rose",
    "24:08" : "Barthélemy",
    "25:08" : "Louis",
    "26:08" : "Natacha",
    "27:08" : "Monique",
    "28:08" : "Augustin",
    "29:08" : "Sabine",
    "30:08" : "Fiacre",
    "31:08" : "Aristide",
    "01:09" : "Gilles",
    "02:09" : "Ingrid",
    "03:09" : "Grégoire",
    "04:09" : "Rosalie",
    "05:09" : "Raïssa",
    "06:09" : "Bertrand",
    "07:09" : "Reine",
    "08:09" : "Adrien",
    "09:09" : "Alain",
    "10:09" : "Inès",
    "11:09" : "Adelphe",
    "12:09" : "Apollinaire",
    "13:09" : "Aime",
    "14:09" : "Lubin",
    "15:09" : "Roland",
    "16:09" : "Édith",
    "17:09" : "Renaud",
    "18:09" : "Nadège",
    "19:09" : "Émilie",
    "20:09" : "Davy",
    "21:09" : "Matthieu",
    "22:09" : "Maurice",
    "23:09" : "Constant",
    "24:09" : "Thecle",
    "25:09" : "Hermann",
    "26:09" : "Damien",
    "27:09" : "Vincent",
    "28:09" : "Venceslas",
    "29:09" : "Michel",
    "30:09" : "Jérôme",
    "01:10" : "Thérèse",
    "02:10" : "Léger",
    "03:10" : "Gérard",
    "04:10" : "François",
    "05:10" : "Fleur",
    "06:10" : "Bruno",
    "07:10" : "Serge",
    "08:10" : "Pélagie",
    "09:10" : "Denis",
    "10:10" : "Ghislain",
    "11:10" : "Firmin",
    "12:10" : "Wilfrid",
    "13:10" : "Géraud",
    "14:10" : "Juste",
    "15:10" : "Thérèse",
    "16:10" : "Edwige",
    "17:10" : "Baudouin",
    "18:10" : "Luc",
    "19:10" : "René Goupil",
    "20:10" : "Lina",
    "21:10" : "Céline",
    "22:10" : "Elodie",
    "23:10" : "Jean",
    "24:10" : "Florentin",
    "25:10" : "Crépin",
    "26:10" : "Dimitri",
    "27:10" : "Émeline",
    "28:10" : "Simon",
    "29:10" : "Narcisse",
    "30:10" : "Bienvenue",
    "31:10" : "Quentin",
    "01:11" : "Dagobert",
    "02:11" : "defunts",
    "03:11" : "Hubert",
    "04:11" : "Charles",
    "05:11" : "Sylvie",
    "06:11" : "Bertille",
    "07:11" : "Carine",
    "08:11" : "Geoffroy",
    "09:11" : "Theodore",
    "10:11" : "Leon",
    "11:11" : "Martin",
    "12:11" : "Christian",
    "13:11" : "Brice",
    "14:11" : "Sidoine",
    "15:11" : "Albert",
    "16:11" : "Marguerite",
    "17:11" : "Élisabeth",
    "18:11" : "Aude",
    "19:11" : "Tanguy",
    "20:11" : "Edmond",
    "21:11" : "Albert",
    "22:11" : "Cécile",
    "23:11" : "Clement",
    "24:11" : "Flora",
    "25:11" : "Catherine",
    "26:11" : "Delphine",
    "27:11" : "Severin",
    "28:11" : "Jacques",
    "29:11" : "Saturnin",
    "30:11" : "Andre",
    "01:12" : "Florence",
    "02:12" : "Viviane",
    "03:12" : "Xavier",
    "04:12" : "Barbara",
    "05:12" : "Gerald",
    "06:12" : "Nicolas",
    "07:12" : "Ambroise",
    "08:12" : "Elfie",
    "09:12" : "Pierre",
    "10:12" : "Romaric",
    "11:12" : "Daniel",
    "12:12" : "Chantal",
    "13:12" : "Lucie",
    "14:12" : "Odile",
    "15:12" : "Ninon",
    "16:12" : "Alice",
    "17:12" : "Gael",
    "18:12" : "Gatien",
    "19:12" : "Urbain",
    "20:12" : "Theophile",
    "21:12" : "Pierre",
    "22:12" : "Xaviere",
    "23:12" : "Armand",
    "24:12" : "Adele",
    "26:12" : "Etienne",
    "27:12" : "Jean",
    "28:12" : "Innocents",
    "29:12" : "David",
    "30:12" : "Roger",
    "31:12" : "Sylvestre"
        }

"""The syntax is hass.states.set(entitiy_id, state, {dict of attributes}) """
hass.states.set("sensor.saint_du_jour" , fetes[feteaujourdhui] ,
  {
    "icon" : "mdi:church" ,
    "friendly_name" : "Saint du jour"
  }
)

hass.states.set("sensor.saint_de_demain" , fetes[fetedemain] ,
  {
    "icon" : "mdi:church" ,
    "friendly_name" : "Saint de demain"
  }
)

```

Code Lovelace

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### SUMMARY
###############################################################################################################################################################
summary:
  card:  
    type: markdown
    card_mod: 
      style: |
        ha-card {
          font-size: 17px;
          font-family: Quicksand;
          height: 25px;
          background: none;
          margin-top: -0.2em;
          margin-left: -5px;
          margin-bottom: -1em;
          box-shadow: none;
        }
    content: >
            <center> <b>{% if is_state('sensor.season', 'spring')%} 🌻 &nbsp;Printemps&nbsp; 🌻
                {% elif is_state('sensor.season', 'summer')%} 🌴 &nbsp;Eté&nbsp; 🌴
                {% elif is_state('sensor.season', 'autumn')%} 🍂 &nbsp;Automne&nbsp; 🍂 
                {% elif is_state('sensor.season', 'winter')%} ❄️ &nbsp;Hiver&nbsp; ❄️ 
                {% else %} Erreur Saison {% endif %} <center> </b>
            <center> {{ states('sensor.date_fr_complete') }} <center> 
            <center> ☀️ Levé {{ as_timestamp(states.sun.sun.attributes.next_rising) | timestamp_custom(' %H:%M') | replace(" 0", "") }} 
            &nbsp;🌙 Couché {{ as_timestamp(states.sun.sun.attributes.next_setting) | timestamp_custom(' %H:%M') | replace(" 0", "") }} <center> 
            <center>{% if is_state('sensor.zodiac', 'gemini')%}<ha-icon icon="mdi:zodiac-gemini"></ha-icon> &nbsp;Gémeaux&nbsp;
                {% elif is_state('sensor.zodiac', 'aries')%} <ha-icon icon="mdi:zodiac-aries"></ha-icon> &nbsp;Bélier&nbsp; 
                {% elif is_state('sensor.zodiac', 'taurus')%} <ha-icon icon="mdi:zodiac-taurus"></ha-icon> &nbsp;Taureau&nbsp; 
                {% elif is_state('sensor.zodiac', 'cancer')%} <ha-icon icon="mdi:zodiac-cancer"></ha-icon> &nbsp;Cancer&nbsp; 
                {% elif is_state('sensor.zodiac', 'leo')%} <ha-icon icon="mdi:zodiac-leo"></ha-icon> &nbsp;Lion&nbsp; 
                {% elif is_state('sensor.zodiac', 'virgo')%} <ha-icon icon="mdi:zodiac-virgo"></ha-icon> &nbsp;Vierge&nbsp; 
                {% elif is_state('sensor.zodiac', 'libra')%} <ha-icon icon="mdi:zodiac-libra"></ha-icon> &nbsp;Balance&nbsp; 
                {% elif is_state('sensor.zodiac', 'scorpio')%} <ha-icon icon="mdi:zodiac-scorpio"></ha-icon> &nbsp;Scorpion&nbsp; 
                {% elif is_state('sensor.zodiac', 'sagittarius')%} <ha-icon icon="mdi:zodiac-sagittarius"></ha-icon> &nbsp;Sagittaire&nbsp; 
                {% elif is_state('sensor.zodiac', 'capricorn')%} <ha-icon icon="mdi:zodiac-capricorn"></ha-icon> &nbsp;Capricorne&nbsp; 
                {% elif is_state('sensor.zodiac', 'aquarius')%} <ha-icon icon="mdi:zodiac-aquarius"></ha-icon> &nbsp;Verseau&nbsp; 
                {% elif is_state('sensor.zodiac', 'pisces')%} <ha-icon icon="mdi:zodiac-pisces"></ha-icon> &nbsp;Poissons&nbsp; 
                {% else %} Erreur Astrologie {% endif %} <center> </b>
                
            <center>{% if not is_state('sensor.jour_ferie', 'unavailable')%} Jour férié : {{ states('sensor.jour_ferie') }}
                    {% elif not is_state('sensor.demain_ferie', 'unavailable')%} Demain jour férié : {{ states('sensor.demain_ferie') }}{% endif %}<center>
                    
            <center><i> 🎉 &nbsp; Nous fêtons la Saint </i>{{ states('sensor.saint_du_jour') }} &nbsp; 🎉 <center>
            <center><i> &nbsp; Demain, nous fêterons la Saint </i>{{ states('sensor.saint_de_demain') }} &nbsp; <center>

```

Scrape: (blague du jour)

```auto
- platform: scrape
    name: blague du jour (1)
    resource: https://jokes-de-papa.com/blagues-courtes/blague-du-jour/
    select: ".elementor-element-25014ec > div:nth-child(1) > p:nth-child(1)"
    scan_interval: 300

  - platform: scrape
    name: blague du jour (2)
    resource: https://jokes-de-papa.com/blagues-courtes/blague-du-jour/
    select: ".elementor-element-25014ec > div:nth-child(1) > p:nth-child(2)"   
    scan_interval: 3600

```

card lovelace blague du jour:

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### BLAGUE DU JOUR
#######################################################################################################################################################################################
joke:
  card:
    type: markdown
    card_mod: 
      style: |
        ha-card {
          font-size: 17px;
          font-family: Quicksand;
          height: 30px;
          background: none;
          margin-top: -1em;
          margin-left: -5px;
          margin-bottom: -0.3em;
          padding: 0 0 0 0;
          box-shadow: none;
        }
        .no-header {
           padding-top: 0px;
        }
    content: >  
                <center> {% if not is_state('sensor.blague_du_jour_1', 'unknown') and not is_state('sensor.blague_du_jour_2', 'unknown')%} {{ states('sensor.blague_du_jour_1') }}{{ states('sensor.blague_du_jour_2') }}
                  {% elif not is_state('sensor.blague_du_jour_1', 'unknown')%} {{ states('sensor.blague_du_jour_1') }}{% endif %}<center>

```

===========================================================  
Card lovelace synology

- j’utilise plusieurs integrations:
- Decluterring card (je vous met le lien du tuto que j’avais fait sur ce forum)  
[https://forum.hacf.fr/t/carte-decluttering-card-reduiser-vos-lignes-de-code-lovelace/4580](https://forum.hacf.fr/t/carte-decluttering-card-reduiser-vos-lignes-de-code-lovelace/4580)
- Multiple entity-row
- custom fold entity row

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### SYNOLOGY
###############################################################################################################################################################
      - type: custom:stack-in-card  
        card_mod: 
          style: |
            ha-card {
              margin-top: 0em;
                }         
        mode: vertical
        cards: 
          - type: picture-entity
            entity: binary_sensor.synology_security_status
            image: /local/images/synology.jpg
            show_name: true
            show_state: false
            name: Synology DS920+
            state_image: 
              "Sécurisé": /local/images/synology.jpg
              "off": /local/images/synology.jpg
            tap_action:
              action: url
              confirmation:
                text: de vouloir aller sur le site synology
              url_path: "https://synology.com"
            hold_action:
              action: none
          - type: 'custom:mini-graph-card'
            card_mod: 
              style: |
                ha-card {
                  font-family: var(--primary-font-family);
                  margin-bottom: -10px;
                }
                .graph {
                  padding-top: 0px;
                  padding-bottom: 0px;
                }
                .info {
                  padding-bottom: 0px;
                }
                .flex {
                  padding-bottom: 6px;
                }
            entities: 
              - sensor.synology_temperature
            name: CPU TEMP
            align_state: center
            align_icon: right
            font_size: 100
            font_size_header: 11
            hours_to_show: 24
            line_color: var(--accent-color)
            line_width: 4
            animate: true
            points_per_hour: 2
            #lower_bound: 0
            show:
              fill: false
              graph: line
              extrema: true
              icon: true
              name: true
          - type: custom:decluttering-card
            template: divider
            variables:
              - text: INFOS
          - type: entities
            card_mod: 
              style: |
                ha-card {
                  font-family: var(--primary-font-family);
                  --my-font01-color: {% if states('sensor.synology_volume_1_volume_used')|int < 70 %} green {% else %} orangered {% endif %};
                  --my-font02-color: {% if states('sensor.synology_volume_1_average_disk_temp')|int < 50 %} green {% else %} orangered {% endif %};
                  --my-font03-color: {% if states('sensor.synology_volume_1_status')== 'normal' %} green {% else %} red {% endif %}
                } 
                .card-content {
                  padding-top: 0px;
                  padding-bottom: 0px;
                }              
            entities:
              - type: custom:fold-entity-row
                head: 
                  entity: sensor.synology_volume_1_status
                  name: Volume
                  type: 'custom:multiple-entity-row'        
                  show_state: false
                  entities:
                    - entity: sensor.synology_volume_1_volume_used
                      name: Utilisé
                      format: 'precision2'
                      styles:
                        color: var(--my-font01-color)
                    - entity: sensor.synology_volume_1_average_disk_temp 
                      name: Température
                      format: 'precision2'
                      styles:
                        color: var(--my-font02-color)
                    - entity: sensor.synology_volume_1_status
                      name: Etat
                      format: 'precision2'
                      styles:
                        color: var(--my-font03-color)
                group_config:
                secondary_info: last-changed
                padding: 5 
                entities:
                  - entity: sensor.synology_drive_1_status
                    type: custom:multiple-entity-row
                    entities:    
                    - entity: sensor.synology_drive_1_temperature
                      name: false
                  - entity: sensor.synology_drive_2_status
                    type: custom:multiple-entity-row
                    entities:    
                    - entity: sensor.synology_drive_2_temperature
                      name: false
                  - entity: sensor.synology_drive_3_status
                    type: custom:multiple-entity-row
                    entities:    
                    - entity: sensor.synology_drive_3_temperature
                      name: false
                  - entity: sensor.synology_drive_4_status
                    type: custom:multiple-entity-row
                    entities:    
                    - entity: sensor.synology_drive_4_temperature
                      name: false 
             #- sensor.cpu_speed  
              - sensor.synology_network_up
              - sensor.synology_network_down 
          - type: custom:decluttering-card
            template: divider
            variables:
              - text: SYSTEME
          - type: horizontal-stack
            cards: 
              - type: horizontal-stack
                cards:                   
                  - type: 'custom:mini-graph-card'
                    card_mod: 
                      style: |
                        ha-card {
                          font-family: var(--primary-font-family);
                        }
                        .graph {
                          padding-top: 0px;
                          padding-bottom: 0px;
                        }
                        .info {
                          padding-bottom: 0px;
                        }
                        .flex {
                          padding-bottom: 10px;
                        }

                    entities: 
                      - sensor.synology_cpu_utilization_total
                    name: CPU LOAD
                    align_state: center
                    align_icon: right
                    font_size: 100
                    font_size_header: 11
                    hours_to_show: 24
                    line_color: var(--accent-color)
                    line_width: 4
                    animate: true
                    points_per_hour: 2
                    #lower_bound: 0
                    show:
                      fill: false
                      graph: line
                      extrema: true
                      icon: true
                      name: true

              - type: 'custom:mini-graph-card'
                card_mod: 
                  style: |
                    ha-card {
                      font-family: var(--primary-font-family);
                    }
                    .graph {
                      padding-top: 0px;
                      padding-bottom: 0px;
                    }
                    .info {
                      padding-bottom: 0px;
                    }
                    .flex {
                      padding-bottom: 10px;
                    }
                entities: 
                  - sensor.synology_memory_usage_real
                name: Memoire
                align_state: center
                align_icon: right
                font_size: 100
                font_size_header: 11
                hours_to_show: 24
                line_color: var(--accent-color)
                line_width: 4
                animate: true
                points_per_hour: 2
                #lower_bound: 0
                show:
                  fill: false
                  graph: line
                  extrema: true
                  icon: true
                  name: true

```

---

<div class="post-metadata">

**Author:** ![Lolobuc54](https://forum.hacf.fr/user_avatar/forum.hacf.fr/lolobuc54/32/29274_2.png) [@Lolobuc54](https://forum.hacf.fr/u/Lolobuc54)\
**Post date:** [Juin 21, 2021, 6:49 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/4 "2021-06-21T18:49:08Z")

</div>

Merci 👍, je vais essayer de l’adapter à mes besoins (c’est pas gagné 😁)

---

<div class="post-metadata">

**Author:** ![foxbru](https://forum.hacf.fr/user_avatar/forum.hacf.fr/foxbru/32/13458_2.png) [@foxbru](https://forum.hacf.fr/u/foxbru)\
**Post date:** [Juin 22, 2021, 1:55 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/5 "2021-06-22T13:55:03Z")

</div>

Salut felix62,

J’aime bien ta carte imprimante

Pourrais -tu partager le code ?

Merci à toi

---

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Juin 22, 2021, 6:33 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/6 "2021-06-22T18:33:03Z")

</div>

Oui bien sur 🙂 @foxbru

code button-card template.yaml :

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### ENCRE IMPRIMANTE
###############################################################################################################################################################
  inkwell:
    show_name: false
    show_state: true
    extra_styles: |
      [[[ return `
        @keyframes pulse {
          5% {
            background-color: ${variables.color};
          }
        }
      `]]]
    styles:
      icon:
        - opacity: 0.7
        - color: '[[[return variables.color]]]'
        - filter: drop-shadow( 0 0 2px rgba(0, 0, 0, .7))
      state:
        - font-size: 1.5em
        - font-weight: bold
        - text-shadow: 0 0 6px black
        - overflow: visible
      card:
        - border: solid 3px gray
        - border-top: none
        - background: |
            [[[
              var level = entity.state;
              var color = variables.color;
              return `linear-gradient(to top, ${color}, ${color} ${level}%, rgba(255,255,255,0.12) ${level}%)`
            ]]]
        - animation: |
            [[[
              return (0 + entity.state) < 10
                ? 'pulse ease-in-out 1s infinite'
                : 'none'
            ]]]

```

Code lovelace card:

```auto
#################################################################################################################################################
#### Imprimante et niveau encre #
#################################################################################################################################################        
      - type: "custom:button-card"
        entity: sensor.cnmf642c_643c_644c
        name: MF643
        color: gray
        show_state: true
        styles:
          card:
            - padding: 0 0 5px 0
          icon:
            - width: 100%
          state:
            - text-align: left
            - width: 100%
          grid:
            - grid-template-areas: '"i c m y k" "n s s s s"'
            - grid-template-columns: 1fr 1fr 1fr 1fr 1fr
            - grid-template-rows: auto 1em
          custom_fields:
            k:
              - width: 80%
              - margin: auto
            c:
              - width: 80%
              - margin: auto
            m:
              - width: 80%
              - margin: auto
            "y":
              - width: 80%
              - margin: auto
        custom_fields:
          k:
            card:
              type: "custom:button-card"
              template: inkwell
              entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_black_toner
              variables:
                color: black
          c:
            card:
              type: "custom:button-card"
              template: inkwell
              entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_cyan_toner
              variables:
                color: cyan
          m:
            card:
              type: "custom:button-card"
              template: inkwell
              entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_magenta_to
              variables:
                color: magenta
          "y":
            card:
              type: "custom:button-card"
              template: inkwell
              entity: sensor.cnmf642c_643c_644c_canon_cartridge_054_yellow_ton
              variables:
                color: yellow

```

---

<div class="post-metadata">

**Author:** ![papoo](https://forum.hacf.fr/user_avatar/forum.hacf.fr/papoo/32/184_2.png) [@papoo](https://forum.hacf.fr/u/papoo)\
**Post date:** [Juin 22, 2021, 8:57 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/7 "2021-06-22T20:57:35Z")

</div>

> [@Felix62](#):
>
> Ou en python:

je lis enfin un utilisateur, merci

---

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Juin 22, 2021, 10:05 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/8 "2021-06-22T22:05:10Z")

</div>

C’est moi qui te remercie @papoo pour ce code très utile 🙂

---

<div class="post-metadata">

**Author:** ![foxbru](https://forum.hacf.fr/user_avatar/forum.hacf.fr/foxbru/32/13458_2.png) [@foxbru](https://forum.hacf.fr/u/foxbru)\
**Post date:** [Juin 23, 2021, 12:19 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/9 "2021-06-23T12:19:34Z")

</div>

Merci

Question de débutant 😓 : ce code button-card template.yaml tu le mets où ?

Cordialement

---

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Juin 25, 2021, 10:00 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/10 "2021-06-25T10:00:52Z")

</div>

Désolé pour l’attente @foxbru , je débute aussi 🙂

Pour infos: tu peux décomposer ton fichier ui-lovelace.yaml pour éviter d’avoir des Km et des Km de code et lorsqu’il y a une erreur tu gagnes du temps également.

pour te répondre dans mon ui-lovelace.yaml cela se présente:

```auto
title: Maison

decluttering_templates:
  !include www/custom-lovelace/decluttering_templates.yaml

button_card_templates:
  !include www/custom-lovelace/button_card_templates.yaml

views: 
  - !include www/lovelace/00_home_view.yaml
  - !include www/lovelace/01_meteo.yaml
  - !include www/lovelace/02_camera.yaml
  - !include www/lovelace/03_informatique.yaml
  - !include www/lovelace/04_settings.yaml
  - !include www/lovelace/05_projets.yaml

```

le button template pointe dit alors que tout mes button template sont dans :  
www → custom-lovelace → button\_card\_templates.yaml

dans lequel tu vas pouvoir coller le template [encre imprimante] :

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### ENCRE IMPRIMANTE
###############################################################################################################################################################
  inkwell:
    show_name: false
    show_state: true
    extra_styles: |
      [[[ return `
        @keyframes pulse {
          5% {
            background-color: ${variables.color};
          }
        }
      `]]]
    styles:
      icon:
        - opacity: 0.7
        - color: '[[[return variables.color]]]'
        - filter: drop-shadow( 0 0 2px rgba(0, 0, 0, .7))
      state:
        - font-size: 1.5em
        - font-weight: bold
        - text-shadow: 0 0 6px black
        - overflow: visible
      card:
        - border: solid 3px gray
        - border-top: none
        - background: |
            [[[
              var level = entity.state;
              var color = variables.color;
              return `linear-gradient(to top, ${color}, ${color} ${level}%, rgba(255,255,255,0.12) ${level}%)`
            ]]]
        - animation: |
            [[[
              return (0 + entity.state) < 10
                ? 'pulse ease-in-out 1s infinite'
                : 'none'
            ]]]

```

N’hésite pas si j’ai manqué de précision 🙂

---

<div class="post-metadata">

**Author:** ![Schumi](https://forum.hacf.fr/user_avatar/forum.hacf.fr/schumi/32/21330_2.png) [@Schumi](https://forum.hacf.fr/u/Schumi)\
**Post date:** [Juillet 30, 2021, 1:58 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/11 "2021-07-30T13:58:05Z")

</div>

Super boulot…  
je peux te demander les code pour la carte avec tes ampoule ? c’est superbe.  
aussi bien pour l’icone, que le reste. si je peux me permettre bien sur. c’est gentil a toi.

---

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Juillet 30, 2021, 4:46 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/12 "2021-07-30T16:46:51Z")

</div>

Le code des ampoule vient de paradis artificiels mais je pourrais te la partager avec plaisir lorsque je rentrerai de voyage 🙂👍

---

<div class="post-metadata">

**Author:** ![Schumi](https://forum.hacf.fr/user_avatar/forum.hacf.fr/schumi/32/21330_2.png) [@Schumi](https://forum.hacf.fr/u/Schumi)\
**Post date:** [Juillet 31, 2021, 9:25 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/13 "2021-07-31T09:25:07Z")

</div>

ok, c’est gentil. merci a toi.  
ne m’oublie pas…

---

<div class="post-metadata">

**Author:** ![Felix62](https://forum.hacf.fr/user_avatar/forum.hacf.fr/felix62/32/7858_2.png) [@Felix62](https://forum.hacf.fr/u/Felix62)\
**Post date:** [Août 8, 2021, 10:00 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/14 "2021-08-08T10:00:08Z")

</div>

Voila @Schumi

Il te faudra certainement mettre les mains dans le cambouis 😛

Lovelace

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### LIGHTS
####################################################################################################################################################################################################################################################################################################################################################
      - type: horizontal-stack   
        cards:
          - type: custom:decluttering-card
            template: light
            variables:
              - name: Salon
              - entity: group.all_lights_salon
              - sensor: sensor.all_lights_salon
              - hold_action: !include popup_card/light_salon.yaml
              - double_tap_action: !include popup_card/light_salon.yaml
          - type: custom:decluttering-card
            template: light
            variables:
              - name: Salle a manger
              - entity: group.all_lights_salle_a_manger
              - sensor: sensor.all_lights_salle_a_manger
              - hold_action: !include popup_card/light_salle_a_manger.yaml
              - double_tap_action: !include popup_card/light_salle_a_manger.yaml
# - type: custom:decluttering-card
# template: light
# variables:
# - name: Entrée
# - entity: group.all_lights_entree
# - sensor: sensor.all_lights_entree
# - double_tap_action: !include popup_card/light_entree.yaml
# - type: custom:decluttering-card
# template: light
# variables:
# - name: Cuisine
# - entity: group.all_lights_cuisine
# - sensor: sensor.all_lights_cuisine
# - double_tap_action: !include popup_card/light_cuisine.yaml
# - type: custom:decluttering-card
# template: light
# variables:
# - name: Salle de bain
# - entity: group.all_lights_sdb
# - sensor: sensor.all_lights_sdb
# - double_tap_action: !include popup_card/light_sdb.yaml
          - type: custom:decluttering-card
            template: light
            variables:
              - name: Chambre
              - entity: group.all_lights_chambre
              - sensor: sensor.all_lights_chambre
              - hold_action: !include popup_card/light_chambre.yaml
              - double_tap_action: !include popup_card/light_chambre.yaml
          - type: custom:decluttering-card
            template: light
            variables:
              - name: HueGo
              - entity: group.all_lights_huego
              - sensor: sensor.all_lights_huego
              - hold_action: !include popup_card/light_huego.yaml
              - double_tap_action: !include popup_card/light_huego.yaml

```

Comme tu as pu le remarquer il fait appelle à des groupes et au decluttering.  
decluttering:

```auto
####################################################################################################################################################################################################################################################################################################################################################
#### LIGHT
####################################################################################################################################################################################################################################################################################################################################################
light:
  card:
    type: custom:button-card
    entity: "[[entity]]"
    icon: mdi:lightbulb
    show_icon: false
    aspect_ratio: 1/1
    name: "[[name]]"
    card_mod:
      style: |
        ha-card {
          box-shadow: 
            {% if is_state('sun.sun', 'above_horizon') and is_state('[[entity]]', 'on') %}
              inset -4px -4px 8px 0 rgba(255,255,255,.5), inset 4px 4px 8px 0 rgba(0,0,0,.03);
            {% elif is_state('sun.sun', 'above_horizon') and is_state('[[entity]]', 'off') %}                      
              -5px -5px 8px 0 rgba(255,255,255,.5),5px 5px 8px 0 rgba(0,0,0,.03);
            {% elif is_state('sun.sun', 'below_horizon') and is_state('[[entity]]', 'on') %}                      
              inset -4px -4px 10px 0 rgba(50, 50, 50,.5), inset 4px 4px 12px 0 rgba(0,0,0,.3); 
            {% elif is_state('sun.sun', 'below_horizon') and is_state('[[entity]]', 'off') %}   
              -5px -5px 8px 0 rgba(50, 50, 50,.5),5px 5px 8px 0 rgba(0,0,0,.15);
            {% endif %} 
        }
    custom_fields:
      notification: >
        [[[return Math.floor(states['[[sensor]]'].state) ]]]
      icon_hue: &icon_hue >
        [[[ const state = entity.state === 'on' ? 'animate' : null;
        return `<svg viewBox="0 0 50 50"><style>@keyframes animate{0%{transform: scale(0.85);}20%{transform: scale(1.1);}40%{transform: scale(0.95);}60%{transform: scale(1.03);}80%{transform: scale(0.97);}100%{transform: scale(1);}}.animate{animation: animate 0.8s; transform-origin: center;}</style>
        <path fill="#9da0a2" d="M27.4 47.3h-4.9s-.7.1-.7.8.4.9.7.9h4.9c.3 0 .7-.1.7-.9s-.7-.8-.7-.8zm3.3-2.9H19.3s-.8 0-.8.8.6.9.8.9h11.5c.2 0 .8-.1.8-.9-.1-.8-.9-.8-.9-.8zm0-3H19.3s-.8 0-.8.8.6.9.8.9h11.5c.2 0 .8-.1.8-.9-.1-.8-.9-.8-.9-.8zm0-2.9H19.3s-.8 0-.8.8.6.9.8.9h11.5c.2 0 .8-.1.8-.9s-.9-.8-.9-.8zm5.2-23.2c-3.3-5.3-7-5.6-10.9-5.6-3.8 0-8.4.4-10.9 5.6-.1.1-.1.3.1.7.4.8 3.3 7.2 3.2 18.8 0 1.1-.1 1.6 0 1.7 0 .1 0 .7 1.1.7h13c1 0 1-.5 1.1-.7v-1.7c-.1-11.6 2.8-18 3.2-18.8.1-.4.1-.5.1-.7"/>
        <path class="${state}" fill="var(--button-card-light-color-no-temperature)" d="M14.1 15.3c3.4-.3 7-.4 10.9-.4 3.8 0 7.5.2 10.9.4.4-.4.7-.8.9-1.1C39 8.5 38.9 6.5 38.9 6c-.2-4.4-8.4-5-12.1-5h0-3.4c-3.7 0-12 .5-12.1 5 0 .5-.1 2.5 2.1 8.2 0 .3.3.8.7 1.1z"/></svg>`; ]]]
    template: light
    styles: &icon_hue_styles
      custom_fields:
        icon_hue:
          [top: 20%, left: 27%, width: 45%, height: 45%, position: absolute]
        notification:
          - background-color: >
              [[[
                if (states['[[sensor]]'].state == 0)
                return "lime";
                return "red";
              ]]]
          - border-radius: 50%
          - position: absolute
          - left: 70%
          - top: 5%
          - height: 20px
          - width: 20px
          - font-size: 15px
          - line-height: 20px
      name:
        - font-size: 13px
        - color: var(--text-color)
        - position: absolute
        - top: 75%
        - padding-bottom: -20px
      card:
        - background-color: var(--primary-background-color)
        - border-radius: 20px
      grid:
        - position: absolute
    state:
      - value: "on"
        styles:
          card:
            - box-shadow: none
          icon:
            - color: "yellow"
        id: on-icon
      - value: "off"
        styles:
          card:
            - box-shadow: none
        id: off-icon
    tap_action:
      action: toggle
    hold_action:
      action: more-info
    double_tap_action: "[[double_tap_action]]"

```

Dans le dossier lovelace \> popupcard:  
light.salon.yaml (c’est un exemple à multiplier en fonction de tes lampes et groupes de lampes)

```auto
              action: fire-dom-event
              browser_mod:
                command: popup
                deviceID:
                  - this
                  - dashboard  
                title: Salon 
                style:
                  $: |
                    .mdc-dialog .mdc-dialog __container .mdc-dialog__ surface {
                      box-shadow:none;
                    }
                  .: |
                    :host {
                      --mdc-theme-surface: rgba(0,0,0,0);
                      --secondary-background-color: rgba(0,0,0,0);
                      --ha-card-background: rgba(0,0,0,0);
                      --ha-card-box-shadow: none;                      
                      --mdc-dialog-scrim-color: rgba(0,0,0,0.8);
                      --mdc-dialog-min-height: 87%;
                      --mdc-dialog-min-width: 100%;
                      --mdc-dialog-max-width: 100%;
                    }
                    mwc-icon-button {
                      color: #FFF;
                    }                                       
                card:
                  type: custom:light-popup-card               
                  entity: light.salon
                  icon: mdi:wall-sconce-flat
                  actionsInARow: 8
                  brightnessWidth: 150px
                  brightnessHeight: 280px
                  switchWidth: 150px
                  switchHeight: 280px   
                  actions:
                    - service: scene.turn_on
                      service_data:
                        entity_id: scene.salon_relax
                      color: "#FDCA64"
                      icon: mdi:camera-iris
                      name: relax
                    - service: scene.turn_on
                      service_data:
                        entity_id: scene.salon_reading
                      color: "#FFE7C0"
                      icon: mdi:camera-iris
                      name: reading
                    - service: scene.turn_on
                      service_data:
                        entity_id: scene.salon_concentrate
                      color: "#BBEEF3"
                      icon: mdi:camera-iris
                      name: concentrate
                    - service: scene.turn_on
                      service_data:
                        entity_id: scene.salon_energize
                      color: "#8BCBDD"
                      icon: mdi:camera-iris
                      name: energize                               
                  settings:
                    openButton: Réglages
                    closeButton: Fermer
                  settingsPosition: bottom
                  displayType: slider
                  fullscreen: false
                  sliderTrackColor: grey #couleur du fond de la gauge exemple: "#727272"
                  settingsCard:
                    type: entities
                    cardOptions:
                      entities: 
                        - type: divider                            
                        - type: custom:slider-entity-row
                          entity: light.salon
                          toggle: true 
                        - type: divider                            
                        - type: custom:slider-entity-row
                          entity: light.spot_1
                          toggle: true 
                        - type: custom:decluttering-card
                          template: rgb-light-card #template color card
                          variables:
                            - entity: light.spot_1                          
                        - type: divider                                                           
                        - type: custom:slider-entity-row
                          entity: light.spot_2
                          toggle: true
                        - type: custom:decluttering-card
                          template: rgb-light-card
                          variables:
                            - entity: light.spot_2                          
                        - type: divider 
                        - type: custom:slider-entity-row
                          entity: light.spot_3
                          toggle: true
                        - type: custom:decluttering-card
                          template: rgb-light-card
                          variables:
                            - entity: light.spot_3                          
                        - type: divider  
                        - type: custom:slider-entity-row
                          entity: light.spot_4
                          toggle: true
                        - type: custom:decluttering-card
                          template: rgb-light-card
                          variables:
                            - entity: light.spot_4                          
                        - type: divider                       
                    cardStyle: |
                      background-color:#FFF;        

```

---

<div class="post-metadata">

**Author:** ![Schumi](https://forum.hacf.fr/user_avatar/forum.hacf.fr/schumi/32/21330_2.png) [@Schumi](https://forum.hacf.fr/u/Schumi)\
**Post date:** [Août 8, 2021, 1:19 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/15 "2021-08-08T13:19:57Z")

</div>

grand merci a toi. je vais jetter un coup d’oeil la dessus.

Du coup, obliger de le faire en yaml ??  
pas possible par le graphic ?

---

<div class="post-metadata">

**Author:** ![Clemalex](https://forum.hacf.fr/user_avatar/forum.hacf.fr/clemalex/32/3691_2.png) [@Clemalex](https://forum.hacf.fr/u/Clemalex)\
**Post date:** [Août 8, 2021, 8:19 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/16 "2021-08-08T20:19:38Z")

</div>

> [@Schumi](#):
>
> pas possible par le graphic ?

Tout est possible par graphique, mais il n’y aura pas autant d’optimisation de code…😇

---

<div class="post-metadata">

**Author:** ![Schumi](https://forum.hacf.fr/user_avatar/forum.hacf.fr/schumi/32/21330_2.png) [@Schumi](https://forum.hacf.fr/u/Schumi)\
**Post date:** [Août 9, 2021, 8:32 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/17 "2021-08-09T08:32:22Z")

</div>

oui, mais alors le decluttering et le template, je dois les mettre dans le dashboard-row tout les deux ??

---

<div class="post-metadata">

**Author:** ![Clemalex](https://forum.hacf.fr/user_avatar/forum.hacf.fr/clemalex/32/3691_2.png) [@Clemalex](https://forum.hacf.fr/u/Clemalex)\
**Post date:** [Août 9, 2021, 9:43 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/18 "2021-08-09T09:43:21Z")

</div>

> [@Schumi](#):
>
> alors le decluttering et le template, je dois les mettre dans le

L’éditeur de configuration :

 ![Screenshot_20210809-114117_Home Assistant](https://forum.hacf.fr/uploads/default/original/2X/e/ed241b5ef6a15d0ec37c41a8f441c5c24bbd8620.jpeg)

---

<div class="post-metadata">

**Author:** ![Schumi](https://forum.hacf.fr/user_avatar/forum.hacf.fr/schumi/32/21330_2.png) [@Schumi](https://forum.hacf.fr/u/Schumi)\
**Post date:** [Août 9, 2021, 11:28 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/19 "2021-08-09T11:28:50Z")

</div>

ok, je vais tester. merci a toi 😉

---

<div class="post-metadata">

**Author:** ![Schumi](https://forum.hacf.fr/user_avatar/forum.hacf.fr/schumi/32/21330_2.png) [@Schumi](https://forum.hacf.fr/u/Schumi)\
**Post date:** [Août 30, 2021, 12:32 UTC](https://forum.hacf.fr/t/mon-dashboard-felix62/5154/20 "2021-08-30T12:32:28Z")

</div>

> [@Felix62](#):
>
> Scrape: (blague du jour)

pour la blague du jour, cela ne fonctionne plus chez moi… Pareil chez toi ?

![Capture d’écran 2021-08-30 à 14.32.08](https://forum.hacf.fr/uploads/default/original/2X/4/42f31652aec35c0ecb6ade5b06da03d8af646c2f.png)

pourtant le lien est toujours correcte.  
quelque chose a modifier sur la carte ou dans le scrape ?

[Page suivante](https://forum.hacf.fr/t/mon-dashboard-felix62/5154.md?page=2)
