lita-onewheel-forecast-io 1.14.4 → 1.14.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/lita/handlers/forecasts.rb +10 -1
- data/lita-onewheel-forecast-io.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b29bdb44e2b85d79a57e85ae3170697c93a7c72d2b0ac85746f794dc96583fbd
|
4
|
+
data.tar.gz: 6faec2852edcb5c7cd999cbfa8d16abc7da4c5418904a314e0142e8e02fc4dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62a337062a60d3eaeb96afc243f09219e504f05427856f636b76d58606502d0ccb8df601004733c7714e92157b9ccd9fe33badd0cceddbb1c3e51125046945f8
|
7
|
+
data.tar.gz: bd35f1af5a9d54d8b8bee86a6fef15796971d7b4355be846ccd23923a4536aee592c0b7cb9965a6e9801c61ac2994473d61b20af61a40a66f6cb4bf3fd053fcb
|
@@ -142,7 +142,10 @@ module ForecastIo
|
|
142
142
|
|
143
143
|
def ansi_temp_forecast(forecast, hours = 24)
|
144
144
|
str, temperature_data = do_the_temp_thing(forecast, 'temperature', ansi_chars, hours)
|
145
|
-
"#{hours} hr temps: #{get_temperature temperature_data.first.round(1)}
|
145
|
+
resp = "#{hours} hr temps: #{get_temperature temperature_data.first.round(1)} "
|
146
|
+
resp += "(feels like #{get_current_apparent_temp(forecast)}) |#{str}| "
|
147
|
+
resp += "#{get_temperature temperature_data.last.round(1)} Range: "
|
148
|
+
resp += "#{get_temperature temperature_data.min.round(1)} - #{get_temperature temperature_data.max.round(1)}"
|
146
149
|
end
|
147
150
|
|
148
151
|
def ansi_temp_apparent_forecast(forecast, hours = 24)
|
@@ -673,5 +676,11 @@ module ForecastIo
|
|
673
676
|
|
674
677
|
"#{uvs.first} |#{str}| #{uvs.last} max: #{uvs.max}"
|
675
678
|
end
|
679
|
+
|
680
|
+
private
|
681
|
+
|
682
|
+
def get_current_apparent_temp(forecast)
|
683
|
+
forecast['hourly']['data'][0]['apparentTemperature']
|
684
|
+
end
|
676
685
|
end
|
677
686
|
end
|