Hallo,
Zur Information der Community gibt es einen Bug, wenn ein Diagramm mit anderen Farben als den Standardfarben erstellt wird.
Ich habe ein Diagramm mit 2 Temperatursensoren erstellt, die Farben dieser beiden Sensoren geändert und beim Speichern stürzt es ab (die Seite bleibt beim Lade-Animation hängen und Fehler sind in der Browserkonsole sichtbar).
@pierre-gilles ich habe das Issue erstellt:
ouvert 05:22PM - 20 Dec 24 UTC
fermé 02:07PM - 23 Jan 25 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"
}
]
}
}
}
```
Danke für die sehr vollständige Antwort Tatsächlich ist es ein Bug!
Ich schaue mir das an, sobald ich alle meine Aufgaben für den Schulanfang erledigt habe