add support for opend state to switch in web gui