code: public function getWeather($postal_code, $country_code = NULL) {
          try {
              $url = "https://home.nest.com/api/0.1/weather/forecast/$postal_code";
              if (!empty($country_code)) {
                  $url .= ",$country_code";
              }
              $weather = $this->doGET($url);
          } catch (RuntimeException $ex) {
              // NESTAPI_ERROR_NOT_JSON_RESPONSE is kinda normal. The forecast API will often return a '502 Bad Gateway' response... meh.
              if ($ex->getCode() != NESTAPI_ERROR_NOT_JSON_RESPONSE) {
                  throw new RuntimeException("Unexpected issue fetching forecast.", $ex->getCode(), $ex);
              }
          }
  
          return (object) array(
              'outside_temperature' => isset($weather->now->current_temperature) ? $this->temperatureInUserScale((float) $weather->now->current_temperature) : NULL,
              'outside_humidity'    => isset($weather->now->current_humidity) ? $weather->now->current_humidity : NULL
          );
      }
docs: Get the outside temperature & humidity, given a location (zip/postal code & optional country code).
  
  @param string $postal_code  Zip or postal code
  @param string $country_code (Optional) Country code
  
  @return stdClass