A clear and concise description of what the problem is.
Wenn in den mrIcons Value der Type String eingetragen ist und das Value die Länge 0 hat, wird fälschlicherweise die Funktion isNAN mit false ausgegeben. Somit geht er in die Routine für Nummer und die Funktion .toFixed schlägt fehl.
Da die Abfrage sowieso für String ist, würde ich den String einfach nehmen wie er ist und anzeigen ohne Formatierung.
if (config.mrIcon1ScreensaverEntity.ScreensaverEntityValue != null) { if (isNaN(getState(config.mrIcon1ScreensaverEntity.ScreensaverEntityValue).val) == false) { payloadString += (getState(config.mrIcon1ScreensaverEntity.ScreensaverEntityValue).val).toFixed(config.mrIcon1ScreensaverEntity.ScreensaverEntityValueDecimalPlace); payloadString += (config.mrIcon1ScreensaverEntity.ScreensaverEntityValueUnit == null) ? '' : config.mrIcon1ScreensaverEntity.ScreensaverEntityValueUnit; if (Debug) log('Value ist eine Zahl ' + payloadString, 'info') } else { payloadString += getState(config.mrIcon1ScreensaverEntity.ScreensaverEntityValue).val if (Debug) log('Value ist keine Zahl ' + payloadString, 'info') } }
Dasgleiche gilt für mr2Icon auch.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
[ ] Provide your apps.yaml (or your config):
apps.yaml here:
- [ ] Go to Settings>Add-ons>AppDaemon>Log (or the output of your TS script) and then, provide the output of the log during your issue/bug occurs:
Log output here:
### TO REPRODUCE
_Steps to reproduce the behavior:_
Entfernen der Funktion für Number Formatierung
### EXPECTED BEHAVIOUR
_A clear and concise description of what you expected to happen._
### SCREENSHOTS
_If applicable, add screenshots/pictures to help explain your problem._
### ADDITIONAL CONTEXT
_Add any other context about the problem here._
_Please note here in case you are using ioBroker_
### PANEL / FIRMWARE VERION
_Please add the Panel/Firmware Version you are using (EU, US-L or US-P)_
IObroker v4.3.3.24
PROBLEM DESCRIPTION
A clear and concise description of what the problem is.
Wenn in den mrIcons Value der Type String eingetragen ist und das Value die Länge 0 hat, wird fälschlicherweise die Funktion isNAN mit false ausgegeben. Somit geht er in die Routine für Nummer und die Funktion .toFixed schlägt fehl. Da die Abfrage sowieso für String ist, würde ich den String einfach nehmen wie er ist und anzeigen ohne Formatierung.
if (config.mrIcon1ScreensaverEntity.ScreensaverEntityValue != null) { if (isNaN(getState(config.mrIcon1ScreensaverEntity.ScreensaverEntityValue).val) == false) { payloadString += (getState(config.mrIcon1ScreensaverEntity.ScreensaverEntityValue).val).toFixed(config.mrIcon1ScreensaverEntity.ScreensaverEntityValueDecimalPlace); payloadString += (config.mrIcon1ScreensaverEntity.ScreensaverEntityValueUnit == null) ? '' : config.mrIcon1ScreensaverEntity.ScreensaverEntityValueUnit; if (Debug) log('Value ist eine Zahl ' + payloadString, 'info') } else { payloadString += getState(config.mrIcon1ScreensaverEntity.ScreensaverEntityValue).val if (Debug) log('Value ist keine Zahl ' + payloadString, 'info') } }
Dasgleiche gilt für mr2Icon auch.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Log output here: