Salut,
Pour info la communauté, il y a un bug lorsqu’un graphique est créé avec des couleurs différentes de celles par défaut.
J’ai créé un graphique avec 2 capteurs de température, modifié les couleurs associées à ces deux capteurs et au moment de sauvegarder, ça plante (la page reste sur l’animation de chargement et des erreurs sont visibles dans la console du navigateur).
@pierre-gilles j’ai créé l’issue :
opened 05:22PM - 20 Dec 24 UTC
**Describe the bug**
When creating a new chart with two sources, selecting anot… her color than the default generates an error "UNPROCESSABLE_ENTITY".
**To Reproduce**
Steps to reproduce the behavior:
1. Create a new dashboard (or edit one)
2. Add a new chart
3. Add two sources (like two temperature devices)
4. Select colors different than the default selected
5. Click on "save"
6. See error, the page is stuck on "loading"
**Expected behavior**
Choosing any color should work as expected
**Screen Recording**
https://github.com/user-attachments/assets/15f95606-7ce7-4c5a-b3ca-abe0dabccd79
**Your Gladys installation (please complete the following information):**
- Docker
- Official last image v4.50.2
**Web browser error**
```
Uncaught (in promise) TypeError: s is undefined
value apexcharts.common.js:6
value apexcharts.common.js:6
value apexcharts.common.js:6
value apexcharts.common.js:6
value apexcharts.common.js:14
value apexcharts.common.js:6
value apexcharts.common.js:14
value apexcharts.common.js:14
c ApexChartComponent.jsx:218
componentDidMount ApexChartComponent.jsx:222
Preact 7
a Chart.jsx:259
componentDidMount Chart.jsx:290
Preact 7
a EditChart.jsx:67
S Preact
```
```
{
"response": {
"status": 422,
"data": {
"status": 422,
"code": "UNPROCESSABLE_ENTITY",
"properties": [
{
"message": "\"[2][0].colors[0]\" must be a string",
"attribute": "boxes",
"value": [
[
{
"type": "temperature-in-room",
"room": "salle-de-bain"
},
{
"type": "humidity-in-room",
"room": "salle-de-bain"
}
],
[
{
"type": "temperature-in-room",
"room": "salle-de-douche"
},
{
"type": "humidity-in-room",
"room": "salle-de-douche"
}
],
[
{
"type": "chart",
"device_feature_names": [
"Salle de bain",
"Douche"
],
"device_features": [
"zigbee2mqtt-sdd-temp-sonoff-temperature-sensor-decimal-temperature",
"zigbee2mqtt-sdb-temp-sonoff-temperature-sensor-decimal-temperature"
],
"title": "Salles d'eau",
"chart_type": "area",
"colors": [
null,
"#00cec9"
],
"display_axes": true,
"display_variation": true,
"interval": "last-day"
}
]
],
"type": "Validation error"
}
]
}
}
}
```
4 « J'aime »
Merci pour l’issue très complète Effectivement c’est un bug !
Je regarde ça dès que j’ai traité toutes mes todos de rentrée
1 « J'aime »