Different apps for showing different weather. What weather inside valley? Wondering we need to pack pants or shorts are fine.
Go with the Yosemite National Park's website weather forecast:
It can be fairly cold at night, even in inside the valley (colder at higher elevation). Can be down to 50's and 40's with overnight low. Just shorts will not be enough at night. Prepare to dress in layers.
Note that marmot commented the daily high is often 2 or 3 degrees cooler than this weather website predicts, but perhaps that's more of a summer phenomenon. And temperatures vary greatly when you hike up out of the Valley floor or hike next to a misting waterfall. If you're driving up to Tuolumne Grove or Mariposa Grove (different directions, but both around 6,000' elevation), the temperature may be 8 - 15 degrees cooler
Here is the weather map for various locations in the Park: https://www.nps.gov/yose/planyourvisit/weathermap.htm