Read the statement by Michael Teeuw here.
MMM-soccer v2
-
@matze86 Change line 249 in MMM-soccer.js from
for (var i = index - 1; i < filteredMatches.length; i++) { nextMatches.push(filteredMatches[i]); }
to
for (var i = index; i < filteredMatches.length; i++) { nextMatches.push(filteredMatches[i]); }
(Remove the “- 1”)
-
i changed it to “+ 1”, because with with i = index it will still display the last game. Or when will the module update the game list? i think on the next matchday?
-
@matze86
Hm. The module has a range of future and recent games.
Then it searches for the index of the first game after the current date.
THen takes that value asindex
, soindex
should be the next game,index-1
the last andindex+1
the one after the next.Does your workaround actually work?
Then I’m thinking wrong. -
On monday it still displayed the last Game with „Index“
Today it works as you described. So this is the best Solution (for me)
nextOther Topic:
leagueWhen will the matchday in „league“ change to the next?
Is it possible to add More columns to the table like this? Or to add up/down arrows? Or to add further Information like CL-Position/EL-Position and so on?
-
@matze86 said in MMM-soccer v2:
Is it possible to add More columns to the table like this? Or to add up/down arrows? Or to add further Information like CL-Position/EL-Position and so on?
I added played games as a column just today . Up and down arrows are a good idea but I need to check if the API gives the most recent table. I don’t think so.
Good idea!
They positions (relegation, qualifications) is most probably not possible.
I’ll check. -
-
@matze86 said in MMM-soccer v2:
Great! I‘ll Update the Module soon
Maybe with a different colour for the Position?
So I checked the API output. Unfortunately we don’t have a reference for the recent table position.
"table": [{ "position": 1, "team": { "id": 5, "name": "FC Bayern München", "crestUrl": "https://crests.football-data.org/5.svg" }, "playedGames": 26, "form": "W,W,W,W,L", "won": 19, "draw": 4, "lost": 3, "points": 61, "goalsFor": 78, "goalsAgainst": 35, "goalDifference": 43 }, ...
We would have to call the API again for the last matchday’s table, which consumes API calls.
I’m not sure if I want that.
I still very much like the idea however.Also, you can see there’s no reference to relegation or qualification ranks
-
Allright… Too Bad…
Here you can see my momentary Soccer Dashboard. I copied your module three times with different configs.
But i‘m Not statisfied with the Symbols of fontawesome. Are there other Styles possible?
I think the api also does Not give the Information about the time of Match? -
@matze86 said in MMM-soccer v2:
I think the api also does Not give the Information about the time of Match?
It does.
Usually APIs work with timestamps or date strings including date and time.
My module is set to only show the time at the day of match. It does not show date AND time due to limited space.if (match.status == "SCHEDULED" || match.status == "POSTPONED") { match.state = (moment(match.utcDate).diff(moment(), 'days') > 7) ? moment(match.utcDate).format("D.MM.") : (moment(match.utcDate).startOf('day') > moment()) ? moment(match.utcDate).format("dd") : moment(match.utcDate).format("LT");
-
thx. now i’ll come closer to a perfect overview :thumbs_up: