Rudi 60 patch hybrid pro button#238
Conversation
a check of a var to be null in javascript shoul bem done like abc !== null current impleantation leads to hybrid_button shown even if it is not a hybrid system
value in kf.secondaryHeatGeneratorStatuus?value is set even if kf.secondaryHeatGeneratorStatus is null remove check on value, check only on kf.secondaryHeatGeneratorStatus
|
Wenn was hältst du von? const isHybrid = typeof kf.secondaryHeatGeneratorStatus?.value === 'string' &&
kf.secondaryHeatGeneratorStatus.value !== ''; |
|
@mschneider82 Wenn auch ein leeres Value abgefragt werden soll, dann vielleicht so: Hier mein JSON Auszug |
|
Die find() Funktion gibt explizit null zurück wenn:
Nicht-Hybrid (Deine Vitocal 250-A): Die find() Funktion:
Hybrid (Mein system): Gibt {type: "string", value: "standby"} zurück ✓ Der PR-Code !== null schlägt fehl wenn:
Beste lösung wäre: Das deckt alle Fälle ab:
|
check if secondary heater info is in JSON/API and has an appropiate value
|
@mschneider82 |
|
@mschneider82 |
No description provided.