code: def data_received(self, data):
          
          if self.state == STATE_STARTING:
              self.state = STATE_RUNNING
              _LOGGER.debug('Websocket handshake: %s', data.decode())
              return
          _LOGGER.debug('Websocket data: %s', data)
  
          while len(data) > 0:
              payload, extra_data = self.get_payload(data)
              self._data = payload ###
              self.async_session_handler_callback('data')###
              #self.async_callback(payload)
              data = extra_data
docs: Data received over websocket.
  
          First received data will allways be handshake accepting connection.
          We need to check how big the header is so we can send event data
          as a proper json object.