-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MMM-Fuel / Gasbuddy - Gas Prices Not Correctly Sorted #110
Comments
An update to this issue. I observed sometimes the last fuel price entries which were not sorted correctly would display as >$2.99. The Gas Buddy and webpage application showed price for that station as "---" (without the quotes). I think that means "price not reported". When the price is "---", the MMM-Fuel data gathering process inserts the price from the previous station and places a ">" before the price amount. It appears there are two issues with the Gasbuddy routines: 1) items are not correctly sorted; 2) items with "price not provided" are incorrectly displayed. |
Update #2 I found the place where missing prices are handled apis/utils/index.js so everything is working as designed. Please excuse that ring. Butch |
Updated original comment for updateinterval = 30000 instead of 30. |
@butchkemper first of all thank you for your donation, much appreciated. I have not received notifications for your issue and only saw it after looking into your Github profile. Looking at your config I can spot two issues caused by the wrong letter casing. It should be camel-cased like this: updateInterval: 30000,
sortBy: "regular", There is a fallback mechanism if there is a wrong value, so it still used The sorting is indeed broken. I created a fix on the develop branch. You can test it with the following commands until I release a new version on the master branch: cd ~/MagicMirror/modules/MMM-Fuel
git checkout develop
git pull
npm i --production |
Thank you for the response. Here are the results from doing the commands you suggested: pi@MagicMirror: I am totally new to git so I need you help to know what to do. Thanks. Butch |
@butchkemper there are modifications on your machine for the file You can revert that file with |
@fewieden Thank you for the help. MMM-Fuel with Gasbuddy is working and the sort problem is corrected. |
Platform (Hardware/OS): Raspberry Pi Model 3 A+
Node version:
MagicMirror² version: v2.23.0
Module version: MMM-Fuel 2.4.0
Description of the issue:
Prices do not sort into correct descending order: entry 5 is more than entry 1, entry 6 is more than entry 2, and entry 7 is equal to entry 2. Please see attached graphic.
Config data is:
{
module: "MMM-Fuel",
position: "top_right",
config: {
provider: "gasbuddy",
zip: "75048",
types: ["regular"],
sortby: "regular",
max: 7,
showDistance: false,
fade: false,
updateinterval: 30000,
rotate: false,
rotateInterval: 15000
}
},
The text was updated successfully, but these errors were encountered: