﻿<?xml version="1.0" encoding="utf-8"?>
<EXOconfigData format="Rwav" version="2023.1.100.35">
  <Object type="View">
    <Attribute name="Name">WeatherForecasts</Attribute>
    <Attribute name="Width">281</Attribute>
    <Attribute name="Height">165</Attribute>
    <Attribute name="Zoom">100%</Attribute>
    <Attribute name="ScaleValue">1</Attribute>
    <Attribute name="OnOpen">this.view.call('.getForecast', {}).then((result) =&gt; {
    
    if (result === undefined) {
      console.error('Failed to get forecast');
      return;
    }
       
    this.view.InOneHour.value(`${result.inOneHour}°C`);
    this.view.InTwoHours.value(`${result.inTwoHours}°C`);
    this.view.InThreeHours.value(`${result.inThreeHours}°C`);
});</Attribute>
    <Attribute name="ServerSideFunctionRPC">accounts.%account%.services.ssf.execute</Attribute>
    <Attribute name="ServerSideJS">return {
    getForecast: async (args, callInfo) =&gt; {        


        return await callInfo.context.state.get({file:"Shared:/forecast.json"});
    }
}</Attribute>
    <Object type="ArgumentsFolder">
      <Attribute name="Name">Arguments</Attribute>
      <Attribute name="Comment">This folder contains all arguments for the view. The arguments can be sent to the view when it is used in run-time.</Attribute>
    </Object>
    <Object type="ElementsFolder">
      <Attribute name="Name">Elements</Attribute>
      <Attribute name="Comment">This folder contains all visual elements for the view.</Attribute>
      <Object type="Text">
        <Attribute name="Name">InOneHour</Attribute>
        <Attribute name="Left">115</Attribute>
        <Attribute name="Top">20</Attribute>
      </Object>
      <Object type="Text">
        <Attribute name="Name">InTwoHours</Attribute>
        <Attribute name="Left">115</Attribute>
        <Attribute name="Top">55</Attribute>
      </Object>
      <Object type="Text">
        <Attribute name="Name">InThreeHours</Attribute>
        <Attribute name="Left">115</Attribute>
        <Attribute name="Top">90</Attribute>
      </Object>
    </Object>
  </Object>
</EXOconfigData>