I use the SmartThings multi-sensors.
Sure, as JDR says, they MIGHT be slightly off due to the glass-mounting and proximity of your heated-home space? I indeed leverage some of the SmartTiles sensors, too (for compare/contrast.)
Anyone who has lived in a high-rise knows that weather “in the clouds” can be different than it is down on the streets below. I like the multi-sensors because they also include humidity and such, too. You might even consider leveraging one that has luminosity sensor, too?
When we lived on the 40th floor in San Fran, the streets below would frequently be socked-in with fog (and temps would drop dramatically down there.) But, up on the 40th floor, things were still bright, sunny, and warm. The light sensor could be leveraged to trigger shade/darkness events.
Mounting: Leveraging the 3M double-back sticky tape should 100% “hold tight” – plus provide some limited insulation from direct radiant heat from the window itself.
I use this 3M tape for decals on my pickup truck, and they remain “stuck” to the truck – even through car washes with spinning brushes and such. Also remains “stuck” at high speeds in all weather (winter, snow, rain, heat, etc.) As a matter of fact, they are rather hard to remove! (Need to slide a piece of dental floss behind them to saw them off.)
Or, you could consider installing a motion multi-sensor, too? (So it will “alert” when there’s a hawk or something soaring outside for you to see?) In San Fran, we saw lots of hawks (pigeon-fighters.) Also saw the Blue Angels streak between the buildings during the annual air show!
I also keep a temp multi-sensor in the refrigerator, too. Where we now live, we suffer periodic/frequent power-outages. It’s important for us to know how long food was at 40+ degrees (so we know what’s safe to keep, and what needs to be tossed in the trash.) Since these sensors are battery powered, (as is the hub,) it really helps us keep a watchful eye on temps (even when the power goes out!)
Good luck!