If conditions are unsafe, you may not leave a child under the age of eight in a vehicle unattended.

Never leave a child under the age of eight unsupervised in a vehicle if conditions present a significant risk to the health and safety of the child. The child must be supervised by and within the sight of a person at least 12 years old.
DMV Writen Test