====== Widget Formulas ====== ===== Functions ===== * [[wiki:COUNT|COUNT()]] * [[wiki:COUNTPATTERN|COUNTPATTERN()]] * [[wiki:COUNTNZ|COUNTNZ()]] * [[wiki:DATE|DATE()]] * [[wiki:DAY|DAY()]] * [[wiki:DAYS|DAYS()]] * [[wiki:DIFF|DIFF()]] * [[wiki:FIRSTNZ|FIRSTNZ()]] * [[wiki:INVERTER_ERROR|INVERTER_ERROR()]] * [[wiki:INVERTER_STATUS|INVERTER_STATUS()]] * [[wiki:LASTCHANGE|LASTCHANGE()]] * [[wiki:LASTNZ|LASTNZ()]] * [[wiki:MAX|MAX()]] * [[wiki:MAXTIME|MAXTIME()]] * [[wiki:MD|MD()]] * [[wiki:MIN|MIN()]] * [[wiki:MINUTES|MINUTES()]] * [[wiki:ROUND|ROUND()]] * [[wiki:SUM|SUM()]] * [[wiki:SUMACTIVE|SUMACTIVE()]] * [[wiki:TOTAL|TOTAL()]] * [[wiki:VALUE|VALUE()]] ===== Operators ===== Standard operators can be used in all formulas, such as +, -, *, /, <, >, <=, >= ( and ). IIF is possibler for expressions: <, <=, >, >= ===== Conditionals ===== In order to test for a condition, you can use the syntax: ''VALUE('variable',0) > 5 ? 1 : 0'' The comparison uses the IIF syntax - so if compared value > 5 the output would be 1 and otherwise (:) 0. ===== Examples ===== This would add the two Watt values of two inverters together and convert to kWh: ''VALUE('delta0w_ac') / 1000 + VALUE('delta1w_ac') / 1000'' This example will output 'High' or 'Low' based on the threshold value. ''VALUE('myvar')>5?'High':'Low' ''