:Templates/29/en

From meteobridge
Revision as of 12:37, 24 February 2018 by Admin (Talk | contribs)

Jump to: navigation, search

Since version 3.6 Meteobridge also supports selection of the sensor which has been defined on "Live Data" tab as primary. When no primary selection has been made all the "0" sensors (like "th0temp", "wind0wind", etc) are primary by default. But when you select "th3temp" as primary sensor and by that its data is reported as your stations outdoor temperature to all the weather networks, then you can now also select the primary sensor in your template definitions by selecting it as the "*" sensor. For example: "th*temp" selects the sensors defined as the primary outdoor temp sensor. When you use "[th*temp-act:--]" you get the current temperature of your primary outdoor temp sensor. This will be a synonym to "[th0temp-act:--] as long as you have not selected another sensor as primary outdoor temp sensor. But when you have selected "th3temp" to be the primary outdoor temp sensor, then "th*temp" will reference to "th3temp" instead of "th0temp". Please be aware that Meteobridge versions before version 3.6 will fail to evaluate "*" sensors. Therefore, it is recommended to provide both notations in a template and to make use of the conditional evaluation as explained in a later chapter. Here is an example that takes "th0temp" as default outdoor sensor on older Meteobridge versions and newer "th*temp" notation on current ones: #if{*[mbsystem-swversion:1.0]>=3.6*}#then#outdoor temp: [th*temp-act:--]°C#else#outdoor temp: [th0temp-act:--]°C#fi#