fix: convert function state to int; added support for buses other than "1"