code: function() {
          var e = $(this);
          var thing_id = e.data("thing");
          var attribute_code = e.data("attribute");
  
          var transporter = js.transport.connect(thing_id, "istate");
          transporter.on_update(function(d) {
              var value = d[attribute_code];
              if (value === undefined) {
                  return;
              }
  
              try {
                  e.find('button').removeClass("selected");
                  e.find('button[data-value="' + value + '"]').addClass("selected");
              } catch(x) {
                  console.log("#", "interactors.enumeration", x);
              }
          });
      }
docs: /* this listens for updates