I have one Custom Graph that displays the results in °C, whilst all other Custom Graphs report in °F. This graph uses a Synthetic Channel.
Here is my script:
-- Script: Outside cooling potential.scpt
-- -------------------------------------------------------------------------------------------------------------------
-- This AppleScript is designed to be loaded into WeatherCat synthetic channel feature to
-- continuously compute the difference between the exterior and interior temperature so monitor
-- when cooling an interior space can be cooled by opening the windows. When it is hotter outside
-- than inside, it returns zero.
--
-- Requires that the Param1 be set to the external temperature and Param2 set to internal
-- temperature
--
-- DISCLAIMER: This AppleScript and associated supporting materials is not subject to copyright
-- protection and has been put into the Public Domain as a public service. The author assumes
-- no responsibility whatsoever for use by other parties of its source code, documentation or other
-- materials, and makes no guarantees, expressed or implied, about its quality, reliability, or any other
-- characteristics. Any user assumes all risk and liability by attempting to use these materials in any
-- form whatsoever.
--
-- -------------------------------------------------------------------------------------------------------------------
set ExteriorT to Param1 -- Convert parameters into names that make code easier to read.
set InteriorT to Param2
if (ExteriorT ≥ InteriorT) then -- If it is hotter outside than inside, no way to cool the interior
return (0) -- Return 0 in those cases.
else -- Otherwise return the difference between in the interior and exterior temperature
return (InteriorT - ExteriorT)
end if
Although the Status of the Sythnetic Channel returns a number that says it is °F it is actually displaying the result in °C.
See the attached screenshot, which shows the current value= 15.6°F. It should be displaying 60.1°F. 15.6 is the Centigrade value.
All other custom graphs using Synthetic Channel or otherwise display correctly in °F.
Any suggestions will be appreciated.