Determine if on "hosted test" or "published"?

Yeah this is a pain for me too. Would appreciate if the live dashboard got sent the state as well.