(siehe Edit unten, funktioniert nun)
Habe bei mir Probleme mit dem Colorpicker. Die aktuelle Farbe wird als Hintergrund des Buttons korrekt angezeigt, wenn ich aber darauf klicke wird die komplette Seite nur weiß.
Hier die 2 Fehler aus der Browser-Console:
react-dom.production.min.js:188
TypeError: Cannot read property 'id' of null
at t.value (SmartColor.js:560)
at Nn (react-dom.production.min.js:167)
at Ln (react-dom.production.min.js:180)
at Jn (react-dom.production.min.js:202)
at Zn (react-dom.production.min.js:203)
at dr (react-dom.production.min.js:212)
at lr (react-dom.production.min.js:211)
at sr (react-dom.production.min.js:211)
at br (react-dom.production.min.js:223)
at Qe (react-dom.production.min.js:89)
SmartColor.js:560
Uncaught TypeError: Cannot read property 'id' of null
at t.value (SmartColor.js:560)
at Nn (react-dom.production.min.js:167)
at Ln (react-dom.production.min.js:180)
at Jn (react-dom.production.min.js:202)
at Zn (react-dom.production.min.js:203)
at dr (react-dom.production.min.js:212)
at lr (react-dom.production.min.js:211)
at sr (react-dom.production.min.js:211)
at br (react-dom.production.min.js:223)
at Qe (react-dom.production.min.js:89)
Hier der state:
{
"from": "system.adapter.homee.0",
"ts": 1536686009149,
"common": {
"name": "Wohnzimmer Iris.Color",
"type": "string",
"unit": "RGB",
"role": "level.color.rgb",
"min": 0,
"max": 16777215,
"read": true,
"write": true,
"custom": {
"homee.0": {
"enabled": true
},
"material": {
"admin": {
"colorMode": "RGB",
"name": "Iris",
"colorOn": "",
"doubleSize": "",
"colorOff": "",
"icon": "",
"iconOff": "",
"background": "",
"enabled": true
}
}
}
},
"native": {
"id": 342,
"node_id": 53,
"type": 23
},
"acl": {
"object": 1636,
"owner": "system.user.admin",
"ownerGroup": "system.group.administrator",
"state": 1636
},
"_id": "homee.0.DimmableColorLight-53.Color-342",
"type": "state"
}
Der state stammt vom homee-Adapter, Datentyp string und standardmäßig role text.color.rgb (statt level.color.rgb). Belasse ich es dabei, wird er allerdings nur als Text mit Eingabemöglichekit in Material angezeigt, also nicht als Farbe interpretiert.
Muss ich den state, den der homee-Adapter liefert, erstmal irgendwie richtig umwandeln? Sollte ein state mit role level.XXX nicht auch vom Typ number sein?
–--------------------
Edit:
Nach dem eben verfügbaren Update des Material-Adapters auf Version 0.10.5 funktioniert nun plötzlich bei mir erstmals alles, auch der Colorpicker. Keine Ahnung, ob es spezifisch an diesem Update lag, oder ob davor was schiefgelaufen war.. Außerdem gibt's nun aber zur Farbtemperatur-Auswahl auch eine Art Colorpicker statt zuvor dem radialen Slider, sehr cool jetzt
Danke