lita-onewheel-forecast-io 1.4.11 → 1.4.12
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf1fbe563345fdf7b6c7cda182d12288bb66928d
|
4
|
+
data.tar.gz: f7ab8db809d9a73376a11e9954fb936998610ce5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1a9af2e0660516208c1a888d89f9a8a9a2c884ddb603b5ac229d177f2920fc820074415e1419457027078781a5dc341f2f3ebac0481060a5e2e98868830fa89
|
7
|
+
data.tar.gz: 698e37efa2717ab9a04950ff98d67f6be2ba99321b901e2c3fea10a17de6231eba4aa808dc2eb58ecab67c78de514a0dc7c083d6e6e9f1969f3e36b5647582a1
|
@@ -466,6 +466,7 @@ module ForecastIo
|
|
466
466
|
time_to_open_the_windows = nil
|
467
467
|
window_close_temp = 0
|
468
468
|
high_temp = 0
|
469
|
+
last_temp = 0
|
469
470
|
|
470
471
|
forecast['hourly']['data'].each_with_index do |hour, index|
|
471
472
|
tm = Time.at(hour['time']).to_datetime.strftime('%k:%M')
|
@@ -479,10 +480,11 @@ module ForecastIo
|
|
479
480
|
window_close_temp = hour['temperature']
|
480
481
|
end
|
481
482
|
|
482
|
-
if !time_to_open_the_windows and time_to_close_the_windows and hour['temperature'].to_i <= 75
|
483
|
+
if !time_to_open_the_windows and time_to_close_the_windows and hour['temperature'] < last_temp and hour['temperature'].to_i <= 75
|
483
484
|
time_to_open_the_windows = hour['time']
|
484
485
|
end
|
485
486
|
|
487
|
+
last_temp = hour['temperature']
|
486
488
|
break if index > 12
|
487
489
|
end
|
488
490
|
|
@@ -513,7 +513,7 @@ describe Lita::Handlers::OnewheelForecastIo, lita_handler: true do
|
|
513
513
|
it '!windows' do
|
514
514
|
mock_up 'windows'
|
515
515
|
send_command 'windows'
|
516
|
-
expect(replies.last).to eq('Close the windows at 16:00, it will be 72°F. Open them back up at
|
516
|
+
expect(replies.last).to eq('Close the windows at 16:00, it will be 72°F. Open them back up at 17:00. The high today will be 72°F.')
|
517
517
|
end
|
518
518
|
|
519
519
|
it 'will not say a 28.000000000000004% chance of rain' do
|