public void GetStatesResponse(CommandResponseObject resp)
        {
            var result = resp.Result as JArray;

            if (result == null)
            {
                Log("GetStatesResponse: result was null");
                return;
            }

            foreach (var obj in result)
            {
                var state = obj.ToObject <StateObject>();
                EntityStateChanged?.Invoke(this, new DataEventArgs <StateObject>(state));
            }
        }
 private void OnSubscribed(CommandResponseObject rep)
 {
     PollStates();
 }