This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Import the messaging module | |
import * as messaging from "messaging"; | |
import document from "document"; | |
// Request weather data from the companion | |
function fetchWeather() { | |
if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) { | |
// Send a command to the companion | |
messaging.peerSocket.send({ |