Read the statement by Michael Teeuw here.
-
@DeSlow you should remove the api key here in the forum this is kind of a password and should not be shared with someone else. i will test this on my machine
-
This post is deleted! -
and 1 question to this:
DependenciesAn installation of MagicMirror2
OPTIONAL: Voice Control
npm
request -------what is this and what got i go white isim so bad in englisch, got dam
-
@DeSlow The config works for me when I replace the quotes. check your pm for support in german
EDIT: the problem was a missing comma in the config file
-
The Addon works great
But: is a filter based on opened station in a defined radius possible?
I want to hide the distance and detailed address, to reduce the size of the mmm-fuel box.
Only Shell (Zip/City), Aral (Zip/City) should be displayed.my requirements in detail:
no rotate (check)
2 types of gas (check)
maximum of 3 displayed station (check)
not possible yet:
display only open stations
reduce length of the station name, remove address, or at least shorten.Thanks (and merry christmas btw)
-
Furthermore i want to hide the car icon, because it does not fit into the mm style (just my opinion)
-
Changelog:
4 new config options
- shortenText: shorten name and address after certain characters
- showAddress: show address of gas station or not
- showOpenOnly: show only gas stations that are open or all
- iconHeader: display icon in header
[card:fewieden/MMM-Fuel]
-
I did a replacement on the Station names, because “Shell” is typically naming there stations after the Street name.
I fixed the City name to have only the first Letter in uppercase.
How can i remove the " null" part, which is occuring at JET stations,
or how can i tidy up the street names? (every seperate word starting with an uppercase)of course i can start with a list of the complete string that should be replaced, but there might be another option.
Thanks :) -
- null @jets is propably that they inserted the house number in the street name and the house number value returns null
- for the street names i would split at the space character and then for each array item charAt(0).toUpperCase() and the rest of the string lowercase and finally join them together
-
I added checks for house numbers==null and splitted the street names.
Also the Brand names starting with (star,ESSO,Aral were replaced automatically)
(Shell and no-name stations are a special case, so i need to handle them individually)But, there is still another special case:
Streetnames with " " or “-” should be splitted, but no housenumbers (from JET :D ).
How can i avoid splitting numbers:
This is the section that does the splitting
words = str.toLowerCase().split(/-| /);
can be found here in total:
https://github.com/Dom1n1c/MMM-Fuel/blob/master/MMM-Fuel.js