Is there a jinja template command that would let me update mysensors below, to put in this weeks mon and friday date? using something similar to the example
and yes, i know the value_template will set the state to “OK” only. I am bringing in the values into attributes because of the 255 char limit of the state.
A while back I made a simple integration for Mealviewer: https://github.com/jdeath/mealviewer My kid’s school just switched to FD MealPlanner, so I made a version for that too: https://github.com/jdeath/fdmealplanner
This is really cool. My child’s school uses mealviewer. They also serve breakfast. I currently have it set up as per your github instructions and it is showing breakfast only. Any idea how to get it to show lunch?
I just checked the repo. Doesn’t look like it’s setup for breakfasts. Would be easy enough to add it looks like, i guess the trickier part would be making it so you can configure it to have or not have breakfast option.
I do not use mealviewer anymore, but feel free to muck around in code.
Looking quickly at the old code, line 112 says “lunch_menu = menus[0]” . try changing that index to [1] and see if it gets the lunch instead. If that does not work, try changing line 106 menus = r.json().get(‘menuSchedules’)[0].get(‘menuBlocks’) to [1] index.
Reviving this thread a bit, sorry folks.
My kid’s schools just switched from Nutrislice to Mealviewer so I just found this thread. I have the custom component from @jaaem installed, but the attributes are still [null]. I just installed it so maybe it needs to update with the next cycle.
However, I also made the rest sensor from @brunkj and all the attributes are showing, but I’m not sure how to put this into a Markdown card. @brunkj do you have an example of how you’re displaying this sensor?
My code should get an update when you restarted home assistant after installation. I have not used it in many years, so the back end could have changed. If the rest sensor works, you could probably adapt my code. But if rest works, stick with that! The markdown code in my readme should give you a clue as what to do. just change the sensor name to what you rest sensor provides.
I just got your code working. Turns out I fat-fingered one extra letter and it took me a few restarts to figure it out. haha.
In case anyone sees this in the future, our school provides breakfast and changing line 112 (not 122) from
lunch_menu = menus[0]
to
lunch_menu = menus[1]
worked to pull in the lunch items.
Thanks so much for making that custom component. So helpful.