Do you mean firmware or device generation? The generation should be obvious from the aesthetics. The gen 2 have the color bar (dimmers) and smaller but similar color indicator on the side,
But to summarize: Gen 1’s look like GE, Honeywell, Zooz and HomeSeer (Gen 1), whereas our Gen 2’s look like what @harjms posted above (switch on the right)
First of all the Gen1’s cannot have their firmware updated.
Depending on your hub you may be able to identify the current firmware of a gen 2 device. I know for Hubitat @bcopelands “Z-Wave Firmware Updater” driver will tell you what the current firmware. This can be done without any intention of updating the firmware at that time.