FTUI3 Pipelines: Unterschied zwischen den Versionen
(Die Seite wurde neu angelegt: „===Pipeline part=== value => input => ftuiHelper.getPart(input, value); ===Pipeline toDate=== value => input => ftuiHelper.dateFromString(input, value); ===Pipeline toBool=== () => input => ftuiHelper.toBool(input); ===Pipeline toInt=== () => input => parseInt(input, 10); ===Pipeline toNumber=== () => input => parseFloat(input, 10); ===Pipeline format=== value => input => ftuiHelper.dateFormat(input, value); ===Pipeline humanized=== () => input =>…“) |
Keine Bearbeitungszusammenfassung |
||
Zeile 68: | Zeile 68: | ||
===Pipeline getHTML=== | ===Pipeline getHTML=== | ||
value => () => send('get ' + value + ' html'); | value => () => send('get ' + value + ' html'); | ||
[[Kategorie:FHEM Tablet UI V3]] |
Version vom 2. August 2024, 15:16 Uhr
Pipeline part
value => input => ftuiHelper.getPart(input, value);
Pipeline toDate
value => input => ftuiHelper.dateFromString(input, value);
Pipeline toBool
() => input => ftuiHelper.toBool(input);
Pipeline toInt
() => input => parseInt(input, 10);
Pipeline toNumber
() => input => parseFloat(input, 10);
Pipeline format
value => input => ftuiHelper.dateFormat(input, value);
Pipeline humanized
() => input => ftuiHelper.durationHumanized(input);
Pipeline round
value => input => ftuiHelper.round(input, value);
Pipeline fix
value => input => Number(input).toFixed(value);
Pipeline roundMoney
() => input => ftuiHelper.formatMoney(Number(input));
Pipeline slice
(start, end) => input => String(input).slice(start, end);
Pipeline encode
() => input => encodeURI(input);
Pipeline add
value => input => Number(input) + value;
Pipeline multiply
value => input => Number(input) * value;
Pipeline divide
value => input => Number(input) / value;
Pipeline replace
(find, replace) => input => String(input).replace(find, replace);
Pipeline map
value => input => ftuiHelper.getMatchingValue(parseHocon(value, true), input);
Pipeline filter
value => input => ftuiHelper.filter((value).split(','), input);
Pipeline step
value => input => ftuiHelper.getStepValue(parseHocon(value, true), input);
Pipeline scale
(minIn, maxIn, minOut, maxOut) => input => ftuiHelper.scale(input, minIn, maxIn, minOut, maxOut);
Pipeline ago
() => input => ftuiHelper.dateAgo(input);
Pipeline till
() => input => ftuiHelper.dateTill(input);
Pipeline timeFormat
(format, inputMode=== 'ms', formatMode=== 'lower') => input => ftuiHelper.timeFormat(input, format, inputMode, formatMode);
Pipeline minusBlue
(value=== 0) => input => Number(input) < value ? 'blue' : null;
Pipeline contains
value => input => String(input).indexOf(value) > -1 ? true : false;
Pipeline not
() => input => input === true ? false : true;;
Pipeline is
value => input => String(input) === value ? true : false;
Pipeline isNot
value => input => String(input) !== value ? true : false;
Pipeline pad
(cnt, char) => input => String(input).padStart(cnt, char);
Pipeline append
value => input => String(input) + value;
Pipeline prepend
value => input => value + String(input);
Pipeline sendCommand
value => () => send(value);
Pipeline getHTML
value => () => send('get ' + value + ' html');