123
Senior Member
Here's how to display the current temperature along with the date and time.
The source of the temperature reading is subject to your discretion. It can be a reading captured by your weather station or a temperature probe. I use a custom Module to retrieve weather information from Environment Canada's RSS feed.
In this example, I'll use the temperature retrieved from The Weather Channel (TWCi) by the XMLWeather Module. Let's assume the TWCiWeather object is located here: "Home.TWCiWeather".
1. In Premise Builder, click Modules in the Shortcut Bar.
2. Navigate to: Modules > AutomationBrowser > DateTime > Classes > DateTime > RenderPlugin
3. Copy and paste the following code immediately after line 12.
4. Press F12 to commit the changes.
Open Premise Browser and confirm the temperature appears next to the time. You may need to refresh the browser (F5) to see the changes.
This tip works for Themes that display date and time in multi-line mode. Some Themes, like Space, might also require moving the text's position to improve its appearance. Navigate to Modules > Plugins > Themes > Space > DateTime > Left and change the value from -230 to -220.
The source of the temperature reading is subject to your discretion. It can be a reading captured by your weather station or a temperature probe. I use a custom Module to retrieve weather information from Environment Canada's RSS feed.
In this example, I'll use the temperature retrieved from The Weather Channel (TWCi) by the XMLWeather Module. Let's assume the TWCiWeather object is located here: "Home.TWCiWeather".
1. In Premise Builder, click Modules in the Shortcut Bar.
2. Navigate to: Modules > AutomationBrowser > DateTime > Classes > DateTime > RenderPlugin
3. Copy and paste the following code immediately after line 12.
Code:
if not Home.TWCiWeather is nothing then
tStr = tStr & ("   " & Home.TWCiWeather.Temperature)
end if
Open Premise Browser and confirm the temperature appears next to the time. You may need to refresh the browser (F5) to see the changes.
This tip works for Themes that display date and time in multi-line mode. Some Themes, like Space, might also require moving the text's position to improve its appearance. Navigate to Modules > Plugins > Themes > Space > DateTime > Left and change the value from -230 to -220.