# Problème d'affichage d'un history graph dans une condition card

**URL:** <https://forum.hacf.fr/t/probleme-daffichage-dun-history-graph-dans-une-condition-card/4954>\
**Category:** Entraide Home Assistant\
**Created:** [Juin 1, 2021, 6:32 UTC](https://forum.hacf.fr/t/probleme-daffichage-dun-history-graph-dans-une-condition-card/4954 "2021-06-01T18:32:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Tophe](https://forum.hacf.fr/user_avatar/forum.hacf.fr/chris_tophe/32/85705_2.png) [@Chris\_Tophe](https://forum.hacf.fr/u/Chris_Tophe)\
**Post date:** [Juin 1, 2021, 6:32 UTC](https://forum.hacf.fr/t/probleme-daffichage-dun-history-graph-dans-une-condition-card/4954/1 "2021-06-01T18:32:07Z")

</div>

Bonjour a tous ,

## Mon problème

Je viens de faire une condition card avec plusieurs cards a l’interieur. Cette condition card est activée par un input\_boolean , lui même renseigné par une picture-entity et son tap action ou je change la valeur de l’input\_boolean.  
Globalement cela fonctionne bien, hormis pour l’history graph qui disparait a l’activation de la condition. il faut alors que je rafraichisse la page du navigateur pour le voir s’afficher .

voici le code de la carte :

```auto
type: conditional
conditions:
  - entity: input_boolean.state_button_serre
    state: 'on'
card:
  type: 'custom:stack-in-card'
  cards:
    - type: markdown
      content: |
        <center> <h3> Mi Flora - serre </h3> </center>
      style: |
        ha-card {
        color: white;
        margin-top: -20px;
        }
    - type: 'custom:stack-in-card'
      mode: vertical
      cards:
        - type: markdown
          content: >
            <img width="125"
            src="https://apps-cdn.athom.com/app/com.mi.flora/1/00700bec-b736-440b-9dc4-fd1b5ab8336a/drivers/flora/assets/images/large.png"/><br>
          style: |
            ha-card {
              margin-top: -20px;
              margin-left: -50px;
            }
        - type: 'custom:bar-card'
          name: ' '
          positions:
            value: outside
            indicator: 'off'
          target: 60
          unit_of_measurement: '%'
          height: 15px
          width: 70%
          entity: sensor.mi_flora_1_moisture
          severity:
            - color: 'rgb(163,0,0)'
              from: 0
              to: 15
            - color: 'rgb(26,204,147,0.33)'
              from: 16
              to: 60
            - color: 'rgb(163,0,0)'
              from: 61
              to: 100
          style: "ha-card {\n --paper-item-icon-color: rgb(47,186,229);\n border-radius: 2.5px;\n height: 40px;\n width: 91%;\n margin-left: 27.5px;\n}\nha-icon\t {\n margin-top: -325px;\n margin-right: -20px;\n}\nbar-card-value\t {\n margin-top: -319px;\n padding-left: 20px;\n}\nbar-card-backgroundbar\t {\n margin-top: -162.5px;\n margin-right: -25px;\n border-radius: 2.5px;\n}\nbar-card-currentbar\t {\n margin-top: -162.5px;\n border-radius: 2.5px;\n}\nbar-card-targetbar {\n margin-top: -162.5px;\n}\nbar-card-markerbar {\n margin-top: -162.5px;\n} \n"
        - type: 'custom:bar-card'
          name: ' '
          positions:
            value: outside
            indicator: 'off'
          target: 1500
          max: 2000
          unit_of_measurement: µS
          height: 15px
          width: 70%
          entity: sensor.mi_flora_1_conductivity
          icon: 'mdi:emoticon-poop'
          severity:
            - color: 'rgb(163,0,0)'
              from: 0
              to: 200
            - color: 'rgb(26,204,147,0.33)'
              from: 201
              to: 1500
            - color: 'rgb(163,0,0)'
              from: 1501
              to: 2000
          style: "ha-card {\n --paper-item-icon-color: rgb(47,186,229);\n border-radius: 2.5px;\n height: 40px;\n width: 92.5%;\n margin-left: 28.5px;\n}\nha-icon\t {\n margin-top: -345px;\n margin-right: -25px;\n padding-right: 5px;\n}\nbar-card-value\t {\n margin-top: -337.5px;\n padding-left: 20px;\n}\nbar-card-backgroundbar\t {\n margin-top: -172.5px;\n border-radius: 2.5px;\n}\nbar-card-currentbar\t {\n margin-top: -172.5px;\n border-radius: 2.5px;\n}\nbar-card-targetbar {\n margin-top: -172.5px;\n}\nbar-card-markerbar {\n margin-top: -172.5px;\n} \n"
        - type: 'custom:bar-card'
          name: ' '
          positions:
            value: outside
            indicator: 'off'
          target: 35
          max: 50
          unit_of_measurement: °C
          height: 15px
          width: 70%
          entity: sensor.mi_flora_1_temperature
          icon: 'mdi:thermometer'
          severity:
            - color: 'rgb(163,0,0)'
              from: 0
              to: 10
            - color: 'rgb(26,204,147,0.33)'
              from: 11
              to: 35
            - color: 'rgb(163,0,0)'
              from: 36
              to: 50
          style: "ha-card {\n --paper-item-icon-color: rgb(47,186,229);\n border-radius: 2.5px;\n height: 40px;\n width: 92.5%;\n margin-left: 28.5px;\n}\nha-icon\t {\n margin-top: -362.5px;\n margin-right: -20px;\n}\nbar-card-value\t {\n margin-top: -357.5px;\n padding-left: 20px;\n}\nbar-card-backgroundbar\t {\n margin-top: -182.5px;\n border-radius: 2.5px;\n}\nbar-card-currentbar\t {\n margin-top: -182.5px;\n border-radius: 2.5px;\n}\nbar-card-targetbar {\n margin-top: -182.5px;\n}\nbar-card-markerbar {\n margin-top: -182.5px;\n} \n"
        - type: 'custom:bar-card'
          name: ' '
          positions:
            value: outside
            indicator: 'off'
          target: 50000
          max: 60000
          unit_of_measurement: Lx
          height: 15px
          width: 70%
          entities:
            - entity: sensor.mi_flora_1_light_intensity
              icon: 'mdi:weather-sunny'
          severity:
            - color: 'rgb(163,0,0)'
              from: 0
              to: 2000
            - color: 'rgb(26,204,147,0.33)'
              from: 2000
              to: 50000
            - color: 'rgb(163,0,0)'
              from: 50001
              to: 100000
          style: "ha-card {\n --paper-item-icon-color: rgb(47,186,229);\n border-radius: 2.5px;\n height: 40px;\n width: 91.5%;\n margin-left: 28.5px;\n}\nha-icon\t {\n margin-top: -384px;\n margin-right: -20px;\n}\nbar-card-value\t {\n margin-top: -377.5px;\n padding-left: 20px;\n}\nbar-card-backgroundbar\t {\n margin-top: -192.5px;\n border-radius: 2.5px;\n}\nbar-card-currentbar\t {\n margin-top: -192.5px;\n border-radius: 2.5px;\n}\nbar-card-targetbar {\n margin-top: -192.5px;\n border-radius: 2.5px;\n}\nbar-card-markerbar {\n margin-top: -192.5px;\n} \n"
      style: |
        ha-card {
          border-radius: 2.5px;
          height: 127.5px;
        }
    - type: 'custom:mini-graph-card'
      entities:
        - sensor.mi_flora_1_moisture
      name: Humidité
      animate: true
      show:
        labels: true
      color_thresholds:
        - value: 0
          color: '#f90000'
        - value: 20
          color: '#f97c00'
        - value: 30
          color: '#4DA784'
        - value: 55
          color: '#00f4ec'
        - value: 60
          color: '#0021f9'
    - type: history-graph
      entities:
        - entity: switch.merossplug1_mss210_main_channel
          hours_to_show: 96
          refresh_interval: 0
      title: Cycle lumière
    - type: entities
      entities:
        - entity: switch.merossplug1_mss210_main_channel
          name: Eclairage
          secondary_info: last-changed
          icon: 'mdi:lightbulb-on'
        - entity: switch.merossplug2_mss210_main_channel
          name: Arrosage
          secondary_info: last-changed
          icon: 'mdi:watering-can'
      title: Interrupteurs

```

J’ai fait le test avec une carte plus simple ( juste l’history graph) et j’ai le meme souci .  
Est ce que quelqu’un d’entre vous a déjà rencontré ce genre de souci ? Quelle piste puis je explorer ?

## Ma configuration

* * *

[center]## System Health

| version | core-2021.5.5 |
| --- | --- |
| installation\_type | Home Assistant OS |
| dev | false |
| hassio | true |
| docker | true |
| virtualenv | false |
| python\_version | 3.8.9 |
| os\_name | Linux |
| os\_version | 5.4.83-v8 |
| arch | aarch64 |
| timezone | Europe/Paris |

> **Home Assistant Community Store**
>
> | GitHub API | ok |
> | --- | --- |
> | Github API Calls Remaining | 4677 |
> | Installed Version | 1.12.4 |
> | Stage | running |
> | Available Repositories | 827 |
> | Installed Repositories | 54 |

> **Home Assistant Cloud**
>
> | logged\_in | false |
> | --- | --- |
> | can\_reach\_cert\_server | ok |
> | can\_reach\_cloud\_auth | ok |
> | can\_reach\_cloud | ok |

> **Home Assistant Supervisor**
>
> | host\_os | Home Assistant OS 5.13 |
> | --- | --- |
> | update\_channel | stable |
> | supervisor\_version | supervisor-2021.05.4 |
> | docker\_version | 19.03.15 |
> | disk\_total | 57.8 GB |
> | disk\_used | 9.1 GB |
> | healthy | true |
> | supported | true |
> | board | rpi4-64 |
> | supervisor\_api | ok |
> | version\_api | ok |
> | installed\_addons | AdGuard Home (4.0.0), Samba share (9.3.1), deCONZ (6.8.0), File editor (5.3.0), ESPHome (1.18.0), Node-RED (9.0.1), Grafana (6.3.5), InfluxDB (4.0.6), Portainer (1.5.0), Log Viewer (0.11.0), Terminal & SSH (9.1.1), Mosquitto broker (6.0.1) |

> **Lovelace**
>
> | dashboards | 1 |
> | --- | --- |
> | resources | 37 |
> | views | 10 |
> | mode | storage |

[/center] Comment récupérer ma configuration : Dans votre HA, Menu latéral `Configuration` \> `Info` \> bouton copier \> `Pour Github` ![image|648x167, 75%](upload://1ietIxFU6nXP1GFrJTzwc2mh0j2.png) \_\_\_
